Copied to clipboard

Flag this post as spam?

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


  • Michael Falch Madsen 70 posts 92 karma points
    Nov 04, 2010 @ 09:36
    Michael Falch Madsen
    0

    inline xslt get value from child?

    Im trying to retrive a single value from a child of currentPage in my template but can only get it to work if i use a macro and it seens a little overkill to create a macro for such a little thing

    <umbraco:Item runat="server" field="produktnummer" xslt="$currentPage/descendant-or-self::node/produktnummer" xsltDisableEscaping="true"/>

     

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 04, 2010 @ 10:07
    Matt Brailsford
    0

    HI Michael,

    I may be wrong, but I'm not sure if $currentPage is available within the context of inline XSLT, you may want to use something like the following instead

    <umbraco:Item runat="server" field="pageID" xslt="umbraco.library:GetXmlNodeById({0})/node[1]/produktnummer" xsltDisableEscaping="true"/>

    NB: As you are using the old scheme in your example, I have assumed that your are using Umbraco 4.0.x, if this is not the case, let me know and I'll give a 4.5 scheme example.

    Matt 

Please Sign in or register to post replies

Write your reply to:

Draft