Last active
July 28, 2017 21:57
-
-
Save jessgusclark/aafd791e9f9e67de139f2415b2742341 to your computer and use it in GitHub Desktop.
Gist for a discussion on the OCN here: https://ocn.omniupdate.com/forums/topic/488/grabbing-title-amp-description-of-tagged-pages-tag-api/view/post_id/1318
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to < 5, not > 5.