Skip to content

Instantly share code, notes, and snippets.

@diomed
Last active August 29, 2015 14:13
Show Gist options
  • Save diomed/2685956627d3ed1e4368 to your computer and use it in GitHub Desktop.
Save diomed/2685956627d3ed1e4368 to your computer and use it in GitHub Desktop.
some xslt code snippets
CATEGORIES
<li><i class="icon-tag"></i>
<a href="{$root}/category/{category/item}" title="View all articles in {category/item}">
<xsl:apply-templates select="category/item"/>
</a>
</li>
ARTICLE IMAGE
<xsl:template match="article-image">
<img class="full-width" alt="" src="{$root}/image/2/790/300/5/fff/0/{@path}/{filename}"/>
</xsl:template>
Kada je drugi handle:
<xsl:for-each select="data/news-images/entry"> <img src="{//data/params/root}/image/1/190/0{photo/@path}/{photo/filename}" alt="photo"/> </xsl:for-each>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment