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.
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. :)
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
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. :)
Certainly is Sebastiaan - i'll take a look, cheers
Si
is working on a reply...