Last active
December 14, 2015 07:18
-
-
Save uniquelau/5049206 to your computer and use it in GitHub Desktop.
Rough working of a 'recall' template, that allows the media templates to be 'recalled', allowing content to be wrapped around the Video, Image, without having to write a whole template. (less duplication!)
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
<!-- CUSTOM :: Support to 'recall' a template --> | |
<xsl:template match="Image" mode="media.recall"> | |
<xsl:param name="class"/> | |
<xsl:param name="crop"/> | |
<xsl:param name="size"/> | |
<xsl:param name="id"/> | |
<xsl:call-template name="GenericImage"> | |
<xsl:with-param name="class" select="$class"/> | |
<xsl:with-param name="crop" select="$crop"/> | |
<xsl:with-param name="id" select="$id"/> | |
<xsl:with-param name="size" select="$size"/> | |
</xsl:call-template> | |
</xsl:template> |
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:template match="Image" priority="1"> | |
<article> | |
<h1><xsl:value-of select="@nodeName" /> | |
<a href="image/{@id}"> | |
<xsl:apply-templates select="." mode="media.recall"> | |
<xsl:with-param name="crop" select="'gallery'" /> | |
</xsl:apply-templates> | |
</a> | |
</article> | |
<!-- Here we wrap some data around our standard 'Image' template --> | |
</xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment