i haven a foreach loop that lists some nodes and theyre properties. each item in the list is displayed in a div, all of these divs have a float left making it sit next to each other from left to right on the page. Just wondering is it possible to move an item to the front of this list(far left) if, for example it has a true/false datatype property that is set to true?
Sometimes it's just as easy to just process that one first, and then all the others, e.g.:
<xsl:template match="/">
<!-- Process the one you want first -->
<xsl:apply-templates select="$currentPage/propertyNameOfFirstItem" />
<!-- Process all others -->
<xsl:apply-templates select="$currentPage/*[not(@isDoc)][not(self::propertyNameOfFirstItem)]">
<xsl:sort order="ascending" />
</xsl:apply-templates>
</xsl:template>
<!-- Template for a single property -->
<xsl:template match="*[not(@isDoc)]">
<div>
<xsl:value-of select="name()" />: <xsl:value-of select="." />
</div>
</xsl:template>
change order in loop
i haven a foreach loop that lists some nodes and theyre properties. each item in the list is displayed in a div, all of these divs have a float left making it sit next to each other from left to right on the page. Just wondering is it possible to move an item to the front of this list(far left) if, for example it has a true/false datatype property that is set to true?
Hi Phil,
Sometimes it's just as easy to just process that one first, and then all the others, e.g.:
/Chriztian
is working on a reply...