I have a for-each that outputs some nodes, there are ocassions where the same node is rendered muliple times, is there a way check that only unique nodes get rendered?
Ok I'm using blog 4 Umbraco and I want to create a list of the latest blog contributors, so this means that I am going to create list of links to the recently updated blogs. The problem I have is that suppose a person creates two posts, then that person will appear in the list of contributors twice where as I only want them to appear once, so my question is can I only show unique blog nodes. Not sure if that is any clearer. Thanks
Output unique nodes
Hello
I have a for-each that outputs some nodes, there are ocassions where the same node is rendered muliple times, is there a way check that only unique nodes get rendered?
Need more input :-)
Show us the XSLT and we'll give you the tools to fix it.
/Chriztian
Ok I'm using blog 4 Umbraco and I want to create a list of the latest blog contributors, so this means that I am going to create list of links to the recently updated blogs. The problem I have is that suppose a person creates two posts, then that person will appear in the list of contributors twice where as I only want them to appear once, so my question is can I only show unique blog nodes. Not sure if that is any clearer. Thanks
<xsl:for-each select="$currentPage/descendant-or-self::node[@nodeTypeAlias='BlogPost']">
<xsl:sort order="descending" select="@createDate" />
<xsl:variable name="blogParent" select="ancestor::node[@nodeTypeAlias='Blog']/@id" />
<xsl:variable name="blogParentName" select="ancestor::node[@nodeTypeAlias='Blog']/@nodeName" />
<xsl:if test="position() < $numOfBlogs">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="umbraco.library:NiceUrl($blogParent)"/>
</xsl:attribute>
<xsl:value-of select="$blogParent"/>
</a>
</li>
</xsl:if>
</xsl:for-each>
is working on a reply...