From 802b188bb459c69cbb90214a4bf049011269331c Mon Sep 17 00:00:00 2001 From: Dan Scott <dan@coffeecode.net> Date: Thu, 22 Aug 2013 10:55:13 -0400 Subject: [PATCH] Bug 6594: Move subject keywords schema.org markup into <span> element Google's rich snippets tool gets confused by the <a property="keywords"> approach, so stuff another span inside the <a> element to remove confusion with the href attribute. Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> --- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 6499927..24c23d8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -546,7 +546,7 @@ <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> <span class="results_summary subjects"><span class="label">Subject(s): </span> <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> - <a property="keywords"> + <a> <xsl:choose> <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> @@ -564,6 +564,7 @@ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute> </xsl:otherwise> </xsl:choose> + <span property="keywords"> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> @@ -573,6 +574,7 @@ </xsl:call-template> </xsl:with-param> </xsl:call-template> + </span> </a> <xsl:if test="marc:subfield[@code=9]"> <a class='authlink'> -- 1.7.9.5