I am using Umbraco V4 With ASP 2.0 on a Windowx XP With IIS7.
[HttpException (0x80004005): Inhoudsbesturingselementen moeten besturingselementen op hoofdniveau zijn in een inhoudspagina of een geneste hoofdpagina waarin wordt verwezen naar een hoofdpagina.] System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +428 System.Web.UI.MasterPage.get_Master() +36 System.Web.UI.MasterPage.ApplyMasterRecursive(MasterPage master, IList appliedMasterFilePaths) +23 System.Web.UI.Page.ApplyMasterPage() +2074111 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685<br /></pre>
</span>
I was watching the 2nd video Templates as we created a master page I ran into this error. I couldn't get this one right and it's getting me frustrated already.
Hmm I am not that good at dutch but I am guessing that you have problems with the masterpage inheritance? ;-)
You have not placed the contentplaceholder tag (<asp:ContentPlaceHolder runat="server" id="MasterContentPlaceHolder" /> ) in your homepage template and I think that is why you get the error.
is een fout opgetreden bij het parseren van een bron die vereist is om
aan deze aanvraag te voldoen. Raadpleeg de volgende details van deze
parser-fout en pas het bronbestand waar nodig aan.
Could maybe try to install the runway module for Umbraco, which you can do under the developer section, and then have a look at how the templates for this package is structured?
I think that could be helpfull and maybe even easier to understand.
I guess you have some kind of misunderstanding how Masters inheritance works.
For example you have your master page with some layout. If you want to inherit it and load content into this Master page you should define a ContentPlaceholder in it. It can be done in this way :
Then in the template that inherits your master you should define content section that will be loaded into master's placeholder (that one was defined above). So your child page should contain the following code.
Adding the code from your original example, I think the following would work for you. I'll assume you saved this template by the name of 'Master'.</p>
<pre class="prettyprint"><pre class="prettyprint"><%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
For the child template, from your original example, be sure to select the 'Master' template in the Template dialog. This will automatically update the <%@ line with the proper MasterPageFile path (I've guessed what it will be in my code sample below, but selecting it and saving the template will ensure it is correct) and will show the child template nested below the parent template in the treeview on the left.
Masterpage Error.
Hello Umbraco lovers(A),
I am using Umbraco V4 With ASP 2.0 on a Windowx XP With IIS7.
In the homepage template I do not see a tag asp:content using the contentplaceholder on the master. That might cause this problem.
Try adding
<asp:Content ID="content1" ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
</asp:Content>
and
<asp:Content ID="content2" ContentPlaceHolderID="MasterContentPlaceHolder" runat="server">
</asp:Content>
and place your items inside the asp:content tags
Nico
Hmm I am not that good at dutch but I am guessing that you have problems with the masterpage inheritance? ;-)
You have not placed the contentplaceholder tag (<asp:ContentPlaceHolder runat="server" id="MasterContentPlaceHolder" /> ) in your homepage template and I think that is why you get the error.
Try doing this in your homepage template instead
Does this help?
/Jan
After following your advice this is my next error (i'm such a newb):
Parser-fout
is een fout opgetreden bij het parseren van een bron die vereist is om aan deze aanvraag te voldoen. Raadpleeg de volgende details van deze parser-fout en pas het bronbestand waar nodig aan.
moeten besturingselementen op hoofdniveau zijn in een inhoudspagina of een geneste hoofdpagina waarin wordt verwezen naar een hoofdpagina.
</td> </tr> </tbody> </table> </span>
Help!
Could maybe try to install the runway module for Umbraco, which you can do under the developer section, and then have a look at how the templates for this package is structured?
I think that could be helpfull and maybe even easier to understand.
Hello Daan,
Your homepage should look like this:
hope this helps..;
cheers Bart
sorry it should look like this :-)
this inserts the homepage in te masterpage:
Ah yes it is not <asp:contentHolder>, which I did suggest. Sorry about that!
Wel, i tried all, but still the error on line 11 with <asp:Content ContentPlaceHolderID="MasterContentPlaceHolder" runat="server">
Is still the same :(
Am i that stupid :S??
The rule is in my Master Template.
Thnx All for helping me out, it is stupid i still didn't figured it out!
Jaivy,
I guess you have some kind of misunderstanding how Masters inheritance works.
For example you have your master page with some layout. If you want to inherit it and load content into this Master page you should define a ContentPlaceholder in it. It can be done in this way :
<asp:ContentPlaceHolder ID="placeholder1" runat="server">
</asp:ContentPlaceHolder>
Then in the template that inherits your master you should define content section that will be loaded into master's placeholder (that one was defined above). So your child page should contain the following code.
<asp:Content ContentPlaceHolderID="placeholder1" runat="server">
<!-- your content goes here -->
</asp:Content>
IMPORTANT: ContentPlaceHolderID property in child template MUST be the same as placeholder's ID property in master page.
You're getting good advice on how asp:Content and asp:ContentPlaceHolder tags work.
A default umbraco installation would probably have the following for your top-most template.
Adding the code from your original example, I think the following would work for you. I'll assume you saved this template by the name of 'Master'.</p> <pre class="prettyprint"><pre class="prettyprint"><%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"><br /><span class="str"> <html>
<head>
<title>Our Website: <umbraco:Item field="</span><span class="pln">pageName</span><span class="str">" runat="</span><span class="pln">server</span><span class="str">"></umbraco:Item></title>
</head>
<body>
<asp:ContentPlaceHolder runat="</span><span class="pln">server</span><span class="str">" id="</span><span class="typ">MasterContentPlaceHolder</span><span class="str">" />
</body>
</html>
</asp:Content></span>
For the child template, from your original example, be sure to select the 'Master' template in the Template dialog. This will automatically update the <%@ line with the proper MasterPageFile path (I've guessed what it will be in my code sample below, but selecting it and saving the template will ensure it is correct) and will show the child template nested below the parent template in the treeview on the left.
</asp:Content>
Let us know what you find out.
Cheers,
doug.
Well, that formatting didn't work at all, did it? Let's try again...Main/Parent/"Master" template with your code:</strong></span>
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<html>
<head>
<title>Our Website: <umbraco:Item field="pageName" runat="server"></umbraco:Item></title>
</head>
<body>
<asp:ContentPlaceHolder runat="server" id="MasterContentPlaceHolder" />
</body>
</html>
</asp:Content>
Child template with your code:</strong></span>
<%@ Master Language="C#" MasterPageFile="/masterpages/Master.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="MasterContentPlaceHolder" runat="server">
<h1><umbraco:Item field="pageName" runat="server"></umbraco:Item></h1>
<umbraco:Item field="bodyText" runat="server"></umbraco:Item>
</asp:Content>
cheers,
doug.
Please ignore the nasty formatting. At least the code came out properly.
cheers,
doug.
I've got the Awnser, The code on line 11 was a wrong code i used <asp:content> Instead of <asp:ContentPlaceHolder>.
I thank you all for helping me out and you've all been a great help!
Thanks(L)uall!
Jaive.
is working on a reply...