Skip to content

Instantly share code, notes, and snippets.

@jessgusclark
Last active July 28, 2017 21:57
Show Gist options
  • Save jessgusclark/aafd791e9f9e67de139f2415b2742341 to your computer and use it in GitHub Desktop.
Save jessgusclark/aafd791e9f9e67de139f2415b2742341 to your computer and use it in GitHub Desktop.
<!-- Create a variable with the data that you want from $taggedItems -->
<xsl:variable name="myvariable">
<xsl:for-each select="$taggedItems">
<xsl:sort select="last-pub-date" order="descending"/>
<item>
<url><xsl:value-of select="..." /></url>
<title><xsl:value-of select="..." /><title>
<description>...</description>
</item>
</xsl:for-each>
</xsl:variable>
<!-- Now loop that variable -->
<xsl:for-each select="$myvariable/item">
<xsl:if test="position() < 5">
<strong><a href="{url}"><xsl:value-of select="{title}" /></a></strong>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="$taggedItems"><!-- Grab the relative PCF URL -->
<xsl:sort select="last-pub-date" order="descending"/>
<xsl:if test="position() < 5">
<!-- Do Work Here -->
</xsl:if>
</xsl:for-each>
@jessgusclark
Copy link
Author

Updated to < 5, not > 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment