Copied to clipboard

Flag this post as spam?

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


  • Milen Kovachev 13 posts 33 karma points
    Mar 26, 2011 @ 07:54
    Milen Kovachev
    0

    GetItem does not return anything?

    Hi,

    I am trying to use the umbraco GetItem function:

        <xsl:variable name="fieldValue" select="umbraco.library:GetItem($currentPage/@id, 'useSimpleHeader')" />

    but it does not return anything although the useSimpleHeader property is on the page I am calling it from.

    Does anyone have an idea where I am going wrong.

    Thanks!

  • Daniel Bardi 927 posts 2562 karma points
    Mar 26, 2011 @ 08:01
    Daniel Bardi
    1

    try this

    <xsl:variable name="fieldValue" select="$currentPage/useSimpleHeader"/>
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 26, 2011 @ 09:45
    Jan Skovgaard
    1

    Hi Milen

    You should fetch the value like Daniel is showing you above. Are there any specific reason why you're trying to use GetItem?

    If I remember correctly GetItem is handy when you need to output content from a rich text editor where there have been placed a macro. In order to get the content from the macro rendered properly you need to use the "GetItem" extension. Not sure how it's supposed to work on other datatypes...

    /Jan

  • Milen Kovachev 13 posts 33 karma points
    Mar 26, 2011 @ 22:58
    Milen Kovachev
    0

    Yes GetItem is certainly not the one I need to use.

    And

    <xsl:variable name="fieldValue" select="$currentPage/useSimpleHeader"/>

    does the trick. If I looked at the raw xml in the database for the current node (page) I would have seen that.

    Thanks for the replies!

     

  • 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