Copied to clipboard

Flag this post as spam?

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


  • Seena 14 posts 34 karma points
    Jan 28, 2013 @ 19:49
    Seena
    0

    How to pass down info to all pages

    How does the info used in master template as umbraco items get passed down to child templates?

    Master template
    Child template 1
    Child template 2

    In Master template I have

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

    The field "training" is text that is entered in umbraco's content tab. This info needs to be entered once and displayed in page placeholders that use Child template 1 and 2.

     

  • Claushingebjerg 886 posts 2415 karma points
    Jan 29, 2013 @ 10:55
    Claushingebjerg
    0

    Hi Seena

    Have you tried

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

     

  • Seena 14 posts 34 karma points
    Jan 29, 2013 @ 21:11
    Seena
    0

    Yes. That does not work.

  • Charles Afford 1163 posts 1709 karma points
    Jan 29, 2013 @ 21:49
    Charles Afford
    0

    Hi, What are you trying to do?  In order to pass information between Master pages you need to do this

    For instance i have a master template called HTML

    <head>

    </head>

    <body>

    <asp:ContentPlaceHolder id="Home" runat="server">

    </asp:ContentPlaceHolder>

    </body>

    In the child templates below this i have a master template called  Home i have 

    <asp:content ContentPlaceHolderId="Home" runat="server">

    <umbraco:Macro Alias="Home" runat="server"></umbraco:Macro>

    </asp:content>

    That will get some inheritance going?  Any problems give me a shout :).  Hope this helps.  Charlie :)

  • Seena 14 posts 34 karma points
    Jan 30, 2013 @ 18:27
    Seena
    0

    Charles,

    The user information is accessed and displayed in master. I just need the child templates to show the same information as the master.

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Jan 30, 2013 @ 18:56
    Chriztian Steinmeier
    0

    Hi Seena,

    If you don't add the <asp:content> tags for the placeholders defined in the Master, the Master's content in them will display on the child templates.

    /Chriztian

  • Seena 14 posts 34 karma points
    Jan 30, 2013 @ 20:00
    Seena
    0

    Chriztian,

    I already dont. Could you give an example?

  • Charles Afford 1163 posts 1709 karma points
    Feb 01, 2013 @ 08:48
    Charles Afford
    0

    Hi Seena,

    Sorry for my late reply.  Why do you need the child pages to show the same information as the master page?  Thanks.  Charles.

  • Seena 14 posts 34 karma points
    Feb 01, 2013 @ 16:53
    Seena
    0

    Charles,

    It is because I have a static menu on the left of all pages for which the information remains the same no matter what page you are on. So it made sense to use "<umbraco:Itemfield="training"recursive="true"runat="server"/>" on the master template thinking the information will be passed down to the slave templates, but apparently this is not how umbraco works hence me being stuck.

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 01, 2013 @ 17:03
    Jan Skovgaard
    0

    Hi Seena

    (Have only skimmed this post so sorry if I'm suggesting something that has already been said - but seems people have been focusing on umbraco:Item stuff)

    I suppose you have made a XSLT macro to render you menu?

    Then you need to add the macro to your template in order to have the menu rendered and make sure it acts dynamically. If you have doubt about how to create the XSLT macro etc. I got a feeling Chriztian might have a trick or two to show you :)

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies