Copied to clipboard

Flag this post as spam?

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


  • Simon steed 359 posts 668 karma points
    Apr 26, 2011 @ 12:12
    Simon steed
    0

    Display content from a doc types template in another page - use RenderTemplate?

    Hi,

    I need to do the following:

    Parent page has a section that is user choosable to display certain panels on the right hand side of the page.

    I have the following structure:

    Home

     Parent Page

      Right Panels

        Right panel item 1

        Right panel item 2 etc

     

    The idea is that the parent page has a right panels container which has a number of sub items. Each of  these sub items has static or dynamic html (i.e. we fix it or use a macro to generate it).

    What I need to do is display the template contents for right panel item 1, 2 etc but in the parent page. How do I do this? Currently i've got the following which lists the nodes and is called from the Parent Page:

     <xsl:for-each select="$currentPage/descendant::* [string(showRightHandPanel) != '0' and name() = 'GenericTemplate' or name()='GotYourOwnStory' or name()='OnDisplay' or name() = 'ShareThisStory' and string(showRightHandPanel) != '0']">
          <xsl:value-of select="@nodeName"/> <!-- display page name debug only -->
           <xsl:value-of select="@id"/><br /> <!-- display page iddebug only -->
          <!-- How do I pull in the template content for this nodeid? cannot get RenderTemplate to work-->
    </xsl:for-each>

    I've tried <xsl:value-of select="umbraco.library:RenderTemplate(@id)" disable-output-escaping="yes"/> but this just results in 404 errors when visualising the xslt and the xslt won't actually save.


    Any suggestions?

    Si

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Apr 26, 2011 @ 12:16
    Sebastiaan Janssen
    0

    This looks like a classic "widgets" requirement, you could get some inspiration from this blog post by Hendy Racher. You might not be able to swtitch to this now, but it's a good one to remember for the future.

    Sorry, don't have the answer for your current set-up. :)

  • Simon steed 359 posts 668 karma points
    Apr 26, 2011 @ 12:18
    Simon steed
    0

    Certainly is Sebastiaan - i'll take a look, cheers

    Si

  • 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