Foundry: New tag for testing if a propery of a content item is present.

git-svn-id: https://svn.libreccm.org/ccm/trunk@3314 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-04-07 12:25:25 +00:00
parent 7a7f99d723
commit 53faf1baa6
1 changed files with 15 additions and 0 deletions

View File

@ -602,6 +602,21 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<xsl:template match="/content-item-layout//if-property">
<xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:variable name="name" select="./@name"/>
<xsl:choose>
<xsl:when test="$contentitem-tree/*[name() = $name]">
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="$contentitem-tree/nav:attribute[@name = $name]">
<xsl:apply-templates/>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="/content-item-layout//show-property"> <xsl:template match="/content-item-layout//show-property">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:variable name="name" select="./@name"/> <xsl:variable name="name" select="./@name"/>