Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • timvdh 7 posts 29 karma points
    Jul 05, 2009 @ 00:45
    timvdh
    0

    Nesting MasterPages?

    Hi,

    I am new to umbraco, I like the concept a lot and I am exploring the capabilities of templates and doc types. One thing I like about Master Pages  is nesting (explained here: http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx). I tried to stick a master and two nested child content templates together but failed. Does someone know if this type of nesting is supported with umbraco?

    Thank you for any ideas in advance.

    Regards,

    Tim

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 05, 2009 @ 01:03
    Jan Skovgaard
    1

    The templates in Umbraco is based on the mastperpage concept and has been since v4 came out last year. So as far as I know there should be no restrictions in the template system.

    I think it would be much easier to help you out if you describe the problem you have with getting the masterpages to work in umbraco :)

    /Jan

  • Paul Blair 466 posts 731 karma points
    Jul 05, 2009 @ 01:23
    Paul Blair
    1

    I find it's easiest to perform the nesting directly in Umbraco rather than editing the aspx pages directly.

    I.e. Log in to Umbraco, go to Settings -> templates, choose your template and select the master template for this template from the drop down list.

    Cheers

    Paul

  • timvdh 7 posts 29 karma points
    Jul 05, 2009 @ 02:15
    timvdh
    0

    Hi,

    thank you for the fast reply, Jan and Paul. The problem I am facing is that the master with the two nested templates  -  which I in fact added as a sub-templates as described by Paul - did not output anything. Since Jan said that it should work, I will look depper into it, I may have just errored on the parameters.

    Regards

    Tim

  • Roel Snetselaar 151 posts 305 karma points
    Jul 05, 2009 @ 02:39
    Roel Snetselaar
    1

    Try it like this.

    Default Masterpage:

    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head> ... </head>
     <body>
      <div id="pageContent">
       <asp:ContentPlaceHolder runat="server" id="childContent" />
      </div>
      </body>
    </html>
    </asp:Content>

    Child Masterpage:

    <%@ Master Language="C#" MasterPageFile="/masterpages/default.master" AutoEventWireup="true" %>
    <asp:content ContentPlaceHolderId="childContent" runat="server">
    <umbraco:Item field="bodyText" runat="server"></umbraco:Item>

    </asp:Content>
  • Tom Maton 387 posts 660 karma points
    Jul 12, 2009 @ 12:56
    Tom Maton
    0

    Hi Tim,

    Have you tried looking at the stack trace to see if there are any errors.

    add ?umbDebugShowTrace=true to the end of your url to display the stack trace

    Tom

Please Sign in or register to post replies

Write your reply to:

Draft