Changeset 26502


Ignore:
Timestamp:
2012-11-23T00:22:23+13:00 (9 years ago)
Author:
davidb
Message:

Section added to the <head>...</head> that lets a collection designer define what <meta .../> tags should be placed in this section of the document view. Presenting this information here improves what web crawlers make of Greenstone3 sites.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl

    r26464 r26502  
    4242        <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
    4343       
     44        <xsl:if test="/page/pageRequest/@action ='d'">
     45         
     46          <xsl:variable name="myMetadataHeader" select="/page/pageResponse/format/gsf:headMetaTags/gsf:metadata"/>
     47          <xsl:for-each select="$myMetadataHeader">
     48            <xsl:variable name="metaname" select="@name"/>
     49           
     50            <xsl:variable name="metavals"
     51                  select="/page/pageResponse/document/metadataList/metadata[@name = $metaname]|/page/pageResponse/document/documentNode/metadataList/metadata[@name = $metaname]"/>
     52            <xsl:for-each select="$metavals">
     53              <META NAME="{$metaname}" CONTENT="{.}"/>
     54            </xsl:for-each>
     55          </xsl:for-each>
     56         
     57        </xsl:if>
     58
    4459        <xsl:choose>
    4560            <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value">
     
    7388       
    7489        <xsl:call-template name="setup-gs-variable"/>
     90
    7591        <xsl:call-template name="additionalHeaderContent"/>
    7692    </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.