I would like my documents to have property called "novelty" and list all the documents that has got it checkboxed. The problem is I want to display all these documents in completly different folder, have a look please:
In other words I need to go sidewise, down and down again. How to do it, can you help?
This should not be too difficult - to get all documents with the novely property checked, regardless of where in the structure you are, do this:
<xsl:param name="currentPage" />
<!-- Grab a handle to the root -->
<xsl:variable name="siteRoot" select="$currentPage/ancestor-or-self::*[@level = 1]" />
<!-- Grab all documents with the novelty property checked -->
<xsl:variable name="allNoveltyDocs" select="$siteRoot//*[@isDoc][novelty = 1]" />
<xsl:template match="/">
<xsl:for-each select="$allNoveltyDocs">
<p><xsl:value-of select="@nodeName" /></p>
</xsl:for-each>
</xsl:template>
The // selector will check every element at any level (in this case below $siteRoot) - so if you know that the "novelty" docs can only be below a certain node, you should include that in the selector to improve performance, e.g.:
list all checked documents in different folder
Hi guys,
I would like my documents to have property called "novelty" and list all the documents that has got it checkboxed. The problem is I want to display all these documents in completly different folder, have a look please:
In other words I need to go sidewise, down and down again. How to do it, can you help?
thanks in advance.
Hi pawel,
This should not be too difficult - to get all documents with the novely property checked, regardless of where in the structure you are, do this:
/Chriztian
is working on a reply...