I’m trying to create nested master pages in Umbraco 4.7.1 and I’m having issues.
I’ve got a masterpage doctype and an index doctype which is a child of masterpage.
Then I have a separate doctype called slide show.
My content looks like this:
- Index
- SlideShow
My master page template has the reference to the index like this:
<asp:ContentPlaceHolder ID="Content" runat="server" />
then inside the index my code is between
<asp:Content ContentPlaceHolderID="Content" runat="server">
</asp:Content>
and inside the Index template I reference the next level which is an Image slider
<asp:ContentPlaceHolder ID="SlideShow" runat="server" />
and the SlideShow template has code between
<asp:Content ContentPlaceHolderID="SlideShow" runat="server">
</asp:Content>
It worked for the Index but not for the slideshow.
The only difference I can think of off hand is the doctype for index is actually a child doctype of the master. And the SlideShow doctype is actually it’s own doctype. Not a child of any of them.
Any ideas how to get this working?
Having nested pages inside Umbraco is perfectly fine. In fact, it’s actually an ASP.Net mechanism which doesn’t necessarily relate to any heirachy in Umbraco. So it’s possible to have unique Umbraco document types which don’t inherit from each other, yet one master template is nested in the other.
Master templates work in a way where a master doesn’t specify which templates inherit from it, it’s always the child template referring to the master template, much like inheritence in object orientated programming languages. The
<asp:Content />tag in the child specifies which<asp:ContentPlaceHolder />it uses from the parent.I’m a bit confused how you’ve setup the master templates from the description, but you should try to have it setup like the following …
Root Master Template:
Index Master Template:
Slide Show Master Template:
You can create as many nested templates as you want, sanity-permitting. Making a document type use the template
Indexwon’t include the slide show. You’d need to give it theSlide Showtemplate instead.There’s more info on it here: http://msdn.microsoft.com/en-us/library/ie/x2b3ktt7.aspx
Hope it helps.