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 629 posts 1016 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 3504 posts 12135 karma points MVP 9x 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 3504 posts 12135 karma points MVP 9x 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 4125 posts 22223 karma points MVP 9x 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 2106 posts 4836 karma points MVP 7x admin 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 4125 posts 22223 karma points MVP 9x 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. 

Please Sign in or register to post replies

Write your reply to:

Draft