Copied to clipboard

Flag this post as spam?

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


  • Lewis 7 posts 27 karma points
    Jan 22, 2010 @ 11:12
    Lewis
    0

    Parent page content not rendering

    Hey guys,

    I'm quite new to umbraco, so I hope I've just missed something obvious.

    Basically, I have page whose parent has three content fields. The parent template renders but the embedded content doesn't.

    However, if I load up the parent page directly (".../parent.aspx" rather than ".../parent/child.aspx"), the content renders fine!

    Am I going about this the wrong way or is this beyond the capabilities of umbraco or...?

    Any help much appreciated :)

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Jan 22, 2010 @ 11:21
    Jesper Ordrup
    0

    Is the child.aspx supposed to display some inherited values from the parent? What have you done to achieve this? Please show some template code and any (xslt) macros you've implemented.

    /jesper

  • Seth Niemuth 275 posts 397 karma points
    Jan 22, 2010 @ 11:27
    Seth Niemuth
    0

    From what you have posted, I am assuming that you want the information that is on your parent page to show up on your content page. What you can use is the 'recursive' property. When you select to insert a property in your template (the insert umbraco page field dialog), check the recursive property and it will show the parents information if there is none in the child.

    Your other option is to create a xslt macro to get the right property but it is a little bit more complicated as it sounds like all you want is the recursive property.

  • Lewis 7 posts 27 karma points
    Jan 22, 2010 @ 11:32
    Lewis
    0

    Jesper:

    Parent:

    <%@ Master Language="C#" MasterPageFile="/masterpages/ColchesterMasterPage.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="MainContainerContent" runat="server">
    <div class="clearIt" id="internalSection">
    <!-- InstanceBeginEditable name="Navigation" -->
    <!-- #BeginLibraryItem "/Library/ConferenceNavigation.lbi" -->
        <div class="left">
            <div class="boxBG">
                <div class="boxBottom">&nbsp;</div>
                <umbraco:Item field="topLeftPanel" runat="server">
                </umbraco:Item>
            </div>
            <div class="boxBG">
                <div class="boxBottom">&nbsp;</div>
                <umbraco:Item field="bottomLeftPanel" runat="server">
                </umbraco:Item>

            </div>
        </div>
        <div class="right whiteCorners">
            <div class="cTL c">&nbsp;</div>
            <div class="cTR c">&nbsp;</div>
            <div class="rightInner">
                <umbraco:Item field="SectionHeader" runat="server"/>
                <asp:ContentPlaceHolder Id="ContentPanel" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <div class="cBL c">&nbsp;</div>
            <div class="cBR c">&nbsp;</div>
        </div>
    </div>
    </asp:Content>

    topLeftPanel, bottomLeftPanel and SectionHeader are not rendering.

     

    Child:

    <%@ Master Language="C#" MasterPageFile="/masterpages/ColchesterMainContainer.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPanel" runat="server">
        <div class="clearIt">
            <umbraco:Item field="bodyText" runat="server"/>
            <div class="colContent threeColumns">
                <umbraco:Item field="leftColumn" runat="server"></umbraco:Item>
            </div>
            <div class="colLinks" style="PADDING: 6px;">
                <umbraco:Item field="centreColumn" runat="server"></umbraco:Item>
            </div>
            <div class="colLinks" style="PADDING: 6px;">
                <umbraco:Item field="rightColumn" runat="server"></umbraco:Item>
            </div>
        </div>
    </asp:Content>

    Thanks for the reply dude!

  • Lewis 7 posts 27 karma points
    Jan 22, 2010 @ 11:38
    Lewis
    0

    Seth,

    That's exactly what I needed. Works fine now.

    Thanks guys :)

  • Seth Niemuth 275 posts 397 karma points
    Jan 22, 2010 @ 11:41
    Seth Niemuth
    0

    Yeah, if you just make your fields for topLeftPanel, bottomLeftPanel, and SectionHeader as recursive then they will show up on the child page

    So, 

     

    <umbraco:Item field="topLeftPanel" runat="server">
               
    </umbraco:Item>

    will become:

    <umbraco:Item field="topLeftPanel" recursive="true" runat="server">
                </umbraco:Item>

     

    Then, in your /parent/child.aspx page, it will pull "topLeftPanel" from parent.aspx if "topLeftPanel" does not exist or does not have a value in child.aspx.

Please Sign in or register to post replies

Write your reply to:

Draft