Commit 1bbecf32 authored by WalkingDexter's avatar WalkingDexter Committed by atymchuk

Issue #3048969 by gbyte.co, WalkingDexter: Add image title and caption to XSL

parent a0bc5479
...@@ -172,24 +172,20 @@ ...@@ -172,24 +172,20 @@
<xsl:variable name="image_location"> <xsl:variable name="image_location">
<xsl:value-of select="image:loc"/> <xsl:value-of select="image:loc"/>
</xsl:variable> </xsl:variable>
<xsl:variable name="image_title">
<xsl:value-of select="image:title"/>
</xsl:variable>
<li> <li>
<a href="{$image_location}"> <a href="{$image_location}" title="{$image_title}">
<xsl:value-of select="$image_location"/> <xsl:choose>
<xsl:when test="image:caption">
<xsl:value-of select="image:caption"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$image_location"/>
</xsl:otherwise>
</xsl:choose>
</a> </a>
<!-- Show this element only if image:caption element is present -->
<xsl:if test="image:caption">
<div>
<span>[image-caption]</span>
<xsl:value-of select="image:caption"/>
</div>
</xsl:if>
<!-- Show this element only if image:title element is present -->
<xsl:if test="image:title">
<div>
<span>[image-title]</span>
<xsl:value-of select="image:title"/>
</div>
</xsl:if>
</li> </li>
</xsl:template> </xsl:template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment