Homepage at umbraco

I am programming in asp.net with umbraco and have a problem with the main page. I made a homepage, then added a webpage homepage that links to my default page. during runtime project in umbraco, when I click the link, I saw this error:

Page not found

No umbraco doc matches URL "http: // local: 20771 / WebForm1.aspx

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

This page can be replaced with a custom 404 page by adding an identifier to the umbraco document displaying 404 pages in /config/umbracoSettings.config. Just add the id to '/ settings / content / errors / error404'.

For more information, visit the 404 Custom Information on the umbraco website.

This page is intentionally left ugly; -)

i searched the net and did not find any solution about it.

+4
source share
2 answers

Make sure your main page is displayed in the administration area through Settings> Templates. Then check that your content page (in the "Admin Content" section) has a specific template (in the "General Properties" section). If this is not the case, and you cannot select a template, then you need to be allowed to use this template for this type of node. Go to "Settings"> "Document Types", select the node type and in the "Permitted Templates" section select the template you want for this page (you can select the sub-main page, it will work fine anyway) - make sure that under the template you selected is selected "Default allowed template" below. As soon as you click "Save", go back to your node in the "Content" section, go to the "General Properties" tab and select the desired template.

Umbraco allows you to use any number of master pages to render node content. When creating new nodes, you select the template that you want to use (or use the default value, as indicated in accordance with the instructions above). You can also force another template to be used at runtime using the "altTemplate = MyTemplateName querystring" parameter on your page URL - convenient for mobile sites, RSS views, etc.

+2
source

On the Master.master page (general home page.) You can find asp: ContentPlaceHolder

pay attention to this code. Perhaps this will 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> 
+1
source

Source: https://habr.com/ru/post/1446639/


All Articles