简体   繁体   中英

master page in umbraco

i'm programming in asp.net with umbraco and have a problem with master page. i made a master page then added a web user master page that link in my default page. at run time project in umbraco when i click on link saw this error :

Page not found

No umbraco document matches the url 'http://localhost:20771/WebForm1.aspx'

umbraco tried this to match it using this xpath query'/root/* [@urlName = "webform1"] | /root/ / [@urlName = "webform1"]')

This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

For more information, visit information about custom 404 on the umbraco website.

This page is intentionally left ugly ;-)

i search in web and did not find any solution about it.

Check that your master page shows up in the admin area via Settings > Templates. Then, check that your content page (in the admin Content section) has a template defined (under "Generic properties"). If it doesn't, and it doesn't let you select a template, then you need to allow that template to be used for that particular node type. Go to Settings > Document Types, select your node type, and under "Allowed templates", select the template that you wish to us for the page (you may select a nested masterpage, it should still work just fine) - also make sure that the "Default allowed template" underneath is selected to your chosen template. Once you have hit "Save", go back to your node in the Content section, go to the "Generic properties" tab, and select the template you wish.

Umbraco lets you use any number of masterpages for rendering a content node. When creating new nodes, you then choose the template you wish to use (or use the default, as specified by following the above instructions). You can also force a different template to be used at runtime, using the ?altTemplate=MyTemplateName querystring option on your page URL - handy for mobile sites, RSS views, and suchlike.

In Master.master page (it's general master page.) you can locate asp:ContentPlaceHolder

please attention to this code.Perhaps it's help you.

  <div style="vertical-align: top;"> <umbraco:Macro ID="Macro1" Alias="NavigationControl" runat="server"></umbraco:Macro> </div> ***<div> <asp:ContentPlaceHolder ID="DefaultPageContent" runat="server"> </asp:ContentPlaceHolder> </div>*** <div> <asp:ContentPlaceHolder ID="TextPageContent" runat="server"> <!-- Insert default "ContactUsContent" markup here --> </asp:ContentPlaceHolder> </div> <div> <asp:ContentPlaceHolder ID="AtAGlanceContent" runat="server"> </asp:ContentPlaceHolder> </div> <div id="footer"> <uc6:FooterControl ID="FooterControl1" runat="server" /> </div> </div> </form> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM