Copied to clipboard

Flag this post as spam?

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


  • David W. 159 posts 284 karma points c-trib
    Oct 14, 2010 @ 14:20
    David W.
    0

    Change currentPage to contentPicker

    Hello,

    I'm modifying some xslt provided in blog4umbraco. I 'm looking to get the xslt to iterate nodes from a contentPicker-paramater, rather than the $currentPage.

    I have crated a macro parameter of type contentPicker and search-and-raplaced the occurances of $currentPage to /macro/myParameterAlias in the xslt. But that does not work as intended...

    How can I achieve this?

  • Rich Green 2246 posts 4006 karma points
    Oct 14, 2010 @ 14:30
    Rich Green
    1

    You need to do something like this (not tested)

    <xsl:variable name="myParameterAlias" select="/macro/myParameterAlias" />
    
    
    <xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($myParameterAlias)" />
    

    Then replace all your $currentPage variables to $currentNode.

    Rich

  • David W. 159 posts 284 karma points c-trib
    Oct 14, 2010 @ 14:37
    David W.
    0

    Works beautifully!

  • 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