Copied to clipboard

Flag this post as spam?

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


  • Tom Maton 387 posts 660 karma points
    Jul 27, 2009 @ 16:21
    Tom Maton
    1

    Retrieve content from homepage node to be displayed on sub pages.

    Hi All,

    I have a multiligual site which has on the home page a tab where the contact details of the office is entered.

    on each country site the phone number will be diplayed through out the site.

    eg
    UK will be 123456789
    Germany will be 987654321
    Netherlands will be 147852369

    I can get this pulled through no problem on the homepage but all the other pages it disappears. So what I am asking is there a way of getting the content to be displayed on all pages even if the content is on the homepage?

    Thanks

    Tom

  • Tommy Poulsen 514 posts 708 karma points
    Jul 27, 2009 @ 16:29
    Tommy Poulsen
    0

    Hi Tom, do you want to display exactly the same info on your different multilingual pages, or coutry-specific info on the related pages? How do you currently display the info on the homepage (the main page, I guess) ?

     

    >Tommy

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jul 27, 2009 @ 16:50
    Thomas Höhler
    1

    there are two approaches: using the masterpage for the frontpage and a submasterpage for the other content

    or you are using xslt via $currentNode/ancestor-or-self::node [level=1]/data [@alias='alias of your values of the frontpage']

    Thomas

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 27, 2009 @ 17:07
    Dirk De Grave
    4

    Or, make sure to use recursive="true" so umbraco will look up the value on ancestors until it finds a value. If those props are defined on the top level node, it will taken from there.

     

    <xsl:value-of select="propertyOnTopLevelNode" recursive="true" />

     

    Cheers,

    /Dirk

  • Tom Maton 387 posts 660 karma points
    Jul 27, 2009 @ 20:01
    Tom Maton
    0

    Hi Dirk,

    Thanks for that, I have tried that but I keep on getting the following error

    >>>   <xsl:value-of select="@contactNumber" recursive="true" /> <<<

    Any idea's why this maybe?

    Tom

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jul 27, 2009 @ 20:05
    Sebastiaan Janssen
    101

    I think Dirk has had a long day, what he meant was to use this directly from with your template/masterpage, like so:

    <umbraco:Item field="@contactNumber" recursive="true" runat="server"></umbraco:Item>
  • Tom Maton 387 posts 660 karma points
    Jul 27, 2009 @ 20:14
    Tom Maton
    0

    Cheers Seb,

    That was perfect :)

Please Sign in or register to post replies

Write your reply to:

Draft