Copied to clipboard

Flag this post as spam?

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


  • Tim Melis 22 posts 43 karma points
    Apr 19, 2011 @ 20:32
    Tim Melis
    0

    How to get property of the "home" node?

     

    Hi,

    I would like to retreive the property value of node on level 1 (home). For some reason no output is generated.

    this works...

      <xsl:variable name="HomeNode" select="umbraco.library:GetXmlNodeById(1122)" />
      <xsl:value-of select="$HomeNode/*[name() = 'searchButtonText']" />

    this doesn't work...

    <xsl:variable name="HomeNode" select="$currentPage/ancestor::root"/>

    this also doesn't work...

     

    <xsl:variable name="HomeNode" select="$currentPage/ancestor-or-self::*[@level = 1]"/>

    Currently, I'm using Umbraco version 4.5.2

    Can anyone please tell me what I'm doing wrong?

    Kind regards

    Tim

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 19, 2011 @ 22:17
    Jan Skovgaard
    0

    Hi Tim

    Not sure if this has any effect, but could you try to use pling's around 1? Like '1'...

    <xsl:variable name="HomeNode" select="$currentPage/ancestor-or-self::*[@level = '1']"/>

    Does this help?

    /Jan

  • Tim Melis 22 posts 43 karma points
    Jun 05, 2011 @ 23:39
    Tim Melis
    0

    Hi Jan,

    Your solution was perfect. Thanx for your feedback. Sorry for the delay.

    Tim

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 06, 2011 @ 19:16
    Jan Skovgaard
    0

    Hi Tim

    I'm very happy to hear that :-)

    Hope you're having a good time with Umbraco.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft