I'm back with another XSLT question that I'm not able to sort out myself, and I can't find the answer in this excellent forum either. Below is the content tree of the site I'm working on. On the homepage and the pages the level below it ("Pressreleaser", "Kontakta oss" &"Dotterbolag") I would like to have a footer which write outs a property from each of the nodes below "Dotterbolag".
In my XSLT i tried:
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
But this obviously only writes out the nodes below the currentPage and I need to loop nodes below a specific node. So the next thing I tried was:
As far as my XSLT knowledge goes I assume that the code above is supposed to loop the nodes below the node of Document Type (alias) "CCDotterbolag" which is the Document Type of "Dotterbolag" in the content tree screenshot above.
I'm stuck and would be thankful for any help on this :)
I assume that the document type of bolag1 and bolag2 is CCDotterBolag. if it's not. in the first line of xslt change CCDotterBolag to the document type of Bolag1 and bolag2
Loop nodes under a specific node
Hi,
I'm back with another XSLT question that I'm not able to sort out myself, and I can't find the answer in this excellent forum either. Below is the content tree of the site I'm working on. On the homepage and the pages the level below it ("Pressreleaser", "Kontakta oss" &"Dotterbolag") I would like to have a footer which write outs a property from each of the nodes below "Dotterbolag".
In my XSLT i tried:
But this obviously only writes out the nodes below the currentPage and I need to loop nodes below a specific node. So the next thing I tried was:
<xsl:for-each select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'CCDotterbolag']/node">
As far as my XSLT knowledge goes I assume that the code above is supposed to loop the nodes below the node of Document Type (alias) "CCDotterbolag" which is the Document Type of "Dotterbolag" in the content tree screenshot above.
I'm stuck and would be thankful for any help on this :)
//Magnus
try this:(1234 is the id of dotterBloag)
variable item is the current item in for-each.
<xsl:for-each select="umbraco.library:GetXmlNodeById(1234)/CCDotterbolag">
<xsl:variable name="item" select="." />
</xsl:for-each>
hope that makes sense
Ali
I assume that the document type of bolag1 and bolag2 is CCDotterBolag. if it's not. in the first line of xslt change CCDotterBolag to the document type of Bolag1 and bolag2
Cheers
Ali
Thanks Ali for your reply! Works like a charm :)
//Magnus
is working on a reply...