Copied to clipboard

Flag this post as spam?

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


  • Dan Evans 616 posts 988 karma points
    Jan 08, 2009 @ 12:49
    Dan Evans
    0

    $currentPage and RenderMacroContent

    I'm confused about what the PageId property of RenderMacroContent does. If i pass in a pageId to a XSLT Macro then should the variable $currentPage not use this? If not, how should the XSLT process the PageId from the RenderMacroContent? At the moment my XSLT is displaying the page of the site it is on and not the value from RenderMacroContent.

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Jan 08, 2009 @ 23:45
    Dave Woestenborghs
    0

    [quote=danimal]I'm confused about what the PageId property of RenderMacroContent does. If i pass in a pageId to a XSLT Macro then should the variable $currentPage not use this? If not, how should the XSLT process the PageId from the RenderMacroContent? At the moment my XSLT is displaying the page of the site it is on and not the value from RenderMacroContent.[/quote]

    Just trying to figure this out myself...so bump !!!

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Jan 09, 2009 @ 00:16
    Dave Woestenborghs
    0

    This helped me work around this problem : http://web-garden.co.uk/2008/8/1/a-general-purpose-umbraco-imagegen-solution-using-xsl-call-template-instead-of-rendermacrocontent.aspx

    But still wondering why RenderMacroContent didn't render the page passed in as a parameter

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    May 10, 2010 @ 16:29
    Matt Brailsford
    0

    Anybody resolved this issue as I'm having the same problem. Should currentPage update? or is there a way to access the id passed in?

  • Warren Buckley 2089 posts 4578 karma points MVP ∞ admin hq c-trib
    May 10, 2010 @ 16:53
    Warren Buckley
    0

    Hey Matt,
    As far as I remember using RenderMacroContent.The ID you pass in using RenderMacroContent, is to be used as the context for the CurrentPage so you will not need to update your XSLT macro.

    http://en.wikibooks.org/wiki/Umbraco/Reference/umbraco.library/RenderMacroContent

    Warren

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    May 10, 2010 @ 17:12
    Matt Brailsford
    0

    In that case it doesn't look like its working as it seems $currentPage is always refering to the page that is rendering the macro, rather than page whos id is passed in (Which I think is the issue that was rased by Dan in the first place).

    Any ideas?

    Matt

  • Pete 152 posts 176 karma points
    Jun 17, 2010 @ 10:10
    Pete
    0

    Bump. I'd love to see a solution to this! It definitely, definitely doesn't pass in the id as currentPage. 

  • 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