Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Im looking for help in showing the content of child nodes within the parent node.
These child nodes have different document types and templates.
I can pull the child node info in, if it is the same template & fields.
Any ideas would be grateful?
<xsl:param name="currentPage"/> <xsl:template match="/"><xsl:variable name="content" select="$currentPage/descendant-or-self::Product-ProductItem/*[@isDoc]"/> <xsl:for-each select="$content"> <div class="row"> <xsl:attribute name="id"> <xsl:value-of select="umbraco.library:Replace(@nodeName,' ', '')" /> </xsl:attribute> <h4> <xsl:value-of select="@nodeName" /> </h4> <p class="lead"><xsl:value-of select="leadParagraph" disable-output-escaping="yes"/></p> <xsl:value-of select="bodyText" disable-output-escaping="yes"/> </div></xsl:for-each> </xsl:template>
Hi Martin,
So basically you just want to display the content of child page within the parent node ?
Just like you would do to make a test for any child node or doc ./* [@isDoc]
<xsl:variable name="test" select="./propertyAlias"/> <xsl:if test="normalize-space($test)"> <xsl:value-of select="propertyAlias" disable-output-escaping="yes"/> </xsl:if>
Hi Fuji,
Im looking to display the child template within the parent.
I have a tree something like this.
- Product-- Product Feature Type A-- Product Feature Type B-- Product Feature Type C
Each "Product Feature" has different property fileds and template.
Rather than have one xslt file atht list all these fields, I was looking for a way to get the child node info as a template.
Ideally this would allow the sorting of each of the "Product Features" within the parent node, in keeping with the order of the child nodes.
Thanks
Anyone, Im still stumped on this.
Did you try to utilize the built in render template for xslt? <xsl:value-of select="umbraco.library:RenderTemplate('Int32 PageId')"/>
Otherwise are you trying properties from the child by themselves or using the template they are in on those page?
Hi Dan,
Ive tried using
<xsl:value-of select="umbraco.library:RenderTemplate(@id,@template)" disable-output-escaping="yes"/>
But it pulls the whole outputted child page, into parent template.
Is there any way to output just what is inside the ASP Content Placeholder?
You want uComponents Render Template :)
http://ucomponents.codeplex.com/wikipage?title=RenderTemplates
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Display Child Node Template in Parent
Hi,
Im looking for help in showing the content of child nodes within the parent node.
These child nodes have different document types and templates.
I can pull the child node info in, if it is the same template & fields.
Any ideas would be grateful?
Hi Martin,
So basically you just want to display the content of child page within the parent node ?
Just like you would do to make a test for any child node or doc ./* [@isDoc]
Hi Fuji,
Im looking to display the child template within the parent.
I have a tree something like this.
- Product
-- Product Feature Type A
-- Product Feature Type B
-- Product Feature Type C
Each "Product Feature" has different property fileds and template.
Rather than have one xslt file atht list all these fields, I was looking for a way to get the child node info as a template.
Ideally this would allow the sorting of each of the "Product Features" within the parent node, in keeping with the order of the child nodes.
Thanks
Anyone, Im still stumped on this.
Did you try to utilize the built in render template for xslt? <xsl:value-of select="umbraco.library:RenderTemplate('Int32 PageId')"/>
Otherwise are you trying properties from the child by themselves or using the template they are in on those page?
Hi Dan,
Ive tried using
<xsl:value-of select="umbraco.library:RenderTemplate(@id,@template)" disable-output-escaping="yes"/>
But it pulls the whole outputted child page, into parent template.
Is there any way to output just what is inside the ASP Content Placeholder?
You want uComponents Render Template :)
http://ucomponents.codeplex.com/wikipage?title=RenderTemplates
is working on a reply...