Copied to clipboard

Flag this post as spam?

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


  • Jason 1 post 21 karma points
    Aug 14, 2010 @ 10:48
    Jason
    0

    XSLT, RenderTemplate, Page Id

    Hi Guys.

    I have a complex situation. I have a macro (XSLT) that loops through a list of nodeIds and uses RenderTemplate to render each of those nodes on a page.

    i.e.

    Template -> Macro - > RenderTemplate -> Template2 -> Macro2

    This is to make reusable content.

    So far, so easy. But now I'd like to put a macro in the template2 that's being called by RenderTemplate. Again no problem there.

    But obviously $currentPage in Macro2 refers to the node that's being rendered with Template2, not the hosting page (the page that generates the URL).

    Is there an easy way to say "I want the nodeId of the main page, not the nodeId of the content being rendered by RenderTemplate"? I can't use xslt to traverse the tree because it's disconnected from the node it's being brought into.

    The only option I've found is GetDocumentByURL but that seems a bit slow. Is there someway of passing parameters through RenderTemplate? Or some other method to get the ID of the hosting paging when using RenderTemplate and macros?

    Thanks for any help or insights anyone might have here,

    J

  • 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