Koha:XSLT Edits: Difference between revisions
From TSAS Library
JStallings (talk | contribs) (Created page with "==Enable Awards Search== <syntaxhighlight lang="html" line="line"> <xsl:if test="marc:datafield[@tag=586]"> <span class="results_summary awardsnote">...") |
JStallings (talk | contribs) No edit summary |
||
Line 17: | Line 17: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Excellent overview of XSLT in this context from U of Hartford<ref>Cook, Sam. "Using XSLT Stylesheets in Koha." U of Hartford.</ref> | Excellent overview of XSLT in this context from U of Hartford<ref>[http://libill.hartford.edu/koha/docs/koha_XSLT_howto.pdf Cook, Sam. "Using XSLT Stylesheets in Koha." U of Hartford.]</ref> | ||
==Resources== | ==Resources== | ||
<references /> | <references /> |
Revision as of 09:52, 16 June 2019
Enable Awards Search
<xsl:if test="marc:datafield[@tag=586]">
<span class="results_summary awardsnote">
<xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
<span class="label">Awards: </span>
</xsl:if>
<xsl:for-each select="marc:datafield[@tag=586]">
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q="<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute><xsl:value-of select="marc:subfield[@code='a']"/></a>
<xsl:if test="marc:subfield[@code='b']">
<span class="separator"><xsl:text>, </xsl:text></span><xsl:value-of select="marc:subfield[@code='b']"/>
</xsl:if>
<xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
</xsl:for-each>
</span>
</xsl:if>
Excellent overview of XSLT in this context from U of Hartford[1]