Hi, newbie here in the forum. I'm using Umbraco 4.11.9. When I tried creating a new Template, the output is different on what's supposed to be. The template is created but the default content is different. I hope someone can help...
Here's the content when I created new template:
And then change the Mvc value to WebForms. After you have change the value to WebForms in the config file, maybe is necessary to recyle the app pool to make the change takes effect.
How did you try to do it? As Dennis writes you should go to the /config/umbracoSettings.config file and find the
However you should be aware that changing the template engine from MVC to Webforms may not be a good idea if your site is already running using MVC templates and functionality. Is this a site that you have been developing on for a long time or have you taken over from other people? And is there any specific reason why you want to use webforms or did you just get surprised to see it was creating a view template (MVC) rather than a master template(Webforms)?
I just took over the project from other people. I looked into the file in Umbraco Backend, under Developer->Config Files.
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
should be set to false if the aspnet account hasn't got readrights of the driveroot up to the /media directory -->
<UploadAllowDirectories>True</UploadAllowDirectories>
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<error404>
<errorPage culture="default">***</errorPage>
<!-- <errorPage culture="en-US">200</errorPage>-->
</error404>
<!--<error404>1</error404>-->
</errors>
<notifications>
<!-- the email that should be used as from mail when umbraco sends a notification -->
<email>[email protected]</email>
</notifications>
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
<ensureUniqueNaming>True</ensureUniqueNaming>
<!-- lowercase, either 'gif' or 'png' -->
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
<!-- clean editor content with use of tidy -->
<TidyEditorContent>True</TidyEditorContent>
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
<TidyCharEncoding>UTF8</TidyCharEncoding>
<!-- to enable new content schema, this needs to be false -->
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
<ForceSafeAliases>true</ForceSafeAliases>
<!-- Enable / disable xml content cache -->
<XmlCacheEnabled>False</XmlCacheEnabled>
<!-- Update disk cache every time content has changed -->
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
<!-- Update in-memory cache if xml file is changed -->
<XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
<!-- Show property descriptions in editing view "icon|text|none" -->
<PropertyContextHelpOption>text</PropertyContextHelpOption>
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
<!-- In seconds. 0 will disable cache -->
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
<!-- Url Resolving ensures that all links works if you run Umbraco in virtual directories -->
<!-- Setting this to true can increase render time for pages with a large number of links -->
<!-- If running Umbraco in virtual directory this *must* be set to true! -->
<ResolveUrlsFromTextString>false</ResolveUrlsFromTextString>
</content>
<security>
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
<keepUserLoggedIn>true</keepUserLoggedIn>
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
</security>
<requestHandler>
<!-- this will ensure that urls are unique when running with multiple root nodes -->
<useDomainPrefixes>false</useDomainPrefixes>
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
<addTrailingSlash>true</addTrailingSlash>
<urlReplacing removeDoubleDashes="true">
<char org=" ">-</char>
<char org="""></char>
<char org="'"></char>
<char org="%"></char>
<char org="."></char>
<char org=";"></char>
<char org="/"></char>
<char org="\"></char>
<char org=":"></char>
<char org="#"></char>
<char org="+">plus</char>
<char org="*">star</char>
<char org="&"></char>
<char org="?"></char>
<char org="æ">ae</char>
<char org="ø">oe</char>
<char org="å">aa</char>
<char org="ä">ae</char>
<char org="ö">oe</char>
<char org="ü">ue</char>
<char org="ß">ss</char>
<char org="Ä">ae</char>
<char org="Ö">oe</char>
<char org="|">-</char>
<char org="<"></char>
<char org=">"></char>
</urlReplacing>
</requestHandler>
<templates>
<useAspNetMasterPages>true</useAspNetMasterPages>
</templates>
<!-- this is used by Umbraco to determine if there's valid classes in the /App_Code folder to be used for Rest/XSLT extensions -->
<developer>
<appCodeFileExtensions>
<ext>cs</ext>
<ext>vb</ext>
</appCodeFileExtensions>
</developer>
<scripting>
<razor>
<!-- razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml -->
<notDynamicXmlDocumentElements>
<element>p</element>
<element>div</element>
<element>ul</element>
<element>span</element>
</notDynamicXmlDocumentElements>
<dataTypeModelStaticMappings>
<!--
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
<mapping documentTypeAlias="textPage" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" documentTypeAlias="textPage" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" documentTypeAlias="textPage">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
<mapping nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
-->
</dataTypeModelStaticMappings>
</razor>
</scripting>
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
<viewstateMoverModule enable="false" />
<logging>
<enableLogging>false</enableLogging>
<enableAsyncLogging>true</enableAsyncLogging>
<disabledLogTypes>
<logTypeAlias>scheduledtask</logTypeAlias>
</disabledLogTypes>
Ok, I get why you're confused since the value we're referring to is not present in your file for some reason. Perhaps some of the old developers removed the setting to make sure that people would not change from MVC to webforms.
However that seems a bit odd since MVC is not default in 4.11. It's default in 7...
But since it's running MVC already I think it's probably best to keep it that way.
Weird Format when creating new template
Hi, newbie here in the forum. I'm using Umbraco 4.11.9. When I tried creating a new Template, the output is different on what's supposed to be. The template is created but the default content is different. I hope someone can help... Here's the content when I created new template:
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @{ Layout = "TwoColumns.cshtml"; }
What I'm expecting is something like this: <%@ Master Language="C#" MasterPageFile="~/masterpages/TwoSections.master" AutoEventWireup="true" %>
Any idea what could have happened?
Hi zykes, and welcome to our.
From the post you have posted your Umbraco installation is set to run MVC. You can change it if you have access to the file system.
If you find the ~/config/umbracoSettings.config. in the file seach for:
<defaultRenderingEngine>Mvc</defaultRenderingEngine>
You can find the documentation here: http://our.umbraco.org/documentation/Reference/Templating/Mvc/ in the beginning for the page.
And then change the Mvc value to WebForms. After you have change the value to WebForms in the config file, maybe is necessary to recyle the app pool to make the change takes effect.
Hope this helps,
/Dennis
Hi Allan,
I tried to check but I can't see it.
Any other portions where I can check?
Thanks.
Regards, Zykes
Hi Zykes
How did you try to do it? As Dennis writes you should go to the /config/umbracoSettings.config file and find the
However you should be aware that changing the template engine from MVC to Webforms may not be a good idea if your site is already running using MVC templates and functionality. Is this a site that you have been developing on for a long time or have you taken over from other people? And is there any specific reason why you want to use webforms or did you just get surprised to see it was creating a view template (MVC) rather than a master template(Webforms)?
/Jan
Hi Jan,
I just took over the project from other people. I looked into the file in Umbraco Backend, under Developer->Config Files.
Hi Zykes
Ok, I get why you're confused since the value we're referring to is not present in your file for some reason. Perhaps some of the old developers removed the setting to make sure that people would not change from MVC to webforms.
However that seems a bit odd since MVC is not default in 4.11. It's default in 7...
But since it's running MVC already I think it's probably best to keep it that way.
/Jan
is working on a reply...