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,
I'm trying to display only a certain Document Type when looping through a folder of content.
Here's what I've got so far:
<xsl:for-each select="$currentPage/node"><xsl:if test="node[@documentTypeAlias = 'Block']">
Display content of doc type block
</xsl:if>
</xsl:for-each>
I'm running umbraco v 4.0.4.2 (Assembly version: 1.0.3811.17115)
Any help would be much appreciated.
Thanks
Pete
Hi Pete,
<xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1'][@nodeTypeAlias='Block']">
Could be what you're looking for? This will only display non hidden 'block' nodes.
Tom
Awesome! that worked a treat, thanks very much Tom.
is working on a reply...
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.
Continue discussion
Checking for Document Type in a loop
Hi,
I'm trying to display only a certain Document Type when looping through a folder of content.
Here's what I've got so far:
<xsl:for-each select="$currentPage/node">
<xsl:if test="node[@documentTypeAlias = 'Block']">
Display content of doc type block
</xsl:if>
</xsl:for-each>
I'm running umbraco v 4.0.4.2 (Assembly version: 1.0.3811.17115)
Any help would be much appreciated.
Thanks
Pete
Hi Pete,
<xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1'][@nodeTypeAlias='Block']">
Could be what you're looking for? This will only display non hidden 'block' nodes.
Tom
Awesome! that worked a treat, thanks very much Tom.
is working on a reply...
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.