Add language parameter to links
git-svn-id: https://svn.libreccm.org/ccm/trunk@4897 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0f6b5c3c8d
commit
4ae670f033
|
|
@ -991,7 +991,14 @@
|
||||||
<xsl:function name="foundry:generate-contentitem-link">
|
<xsl:function name="foundry:generate-contentitem-link">
|
||||||
<xsl:param name="oid"/>
|
<xsl:param name="oid"/>
|
||||||
|
|
||||||
<xsl:sequence select="concat($context-prefix, '/redirect/?oid=', $oid)"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="foundry:get-setting('appendLanguageParameter', '') = 'true'">
|
||||||
|
<xsl:sequence select="concat($context-prefix, '/redirect/?oid=', $oid, '&lang=', $negotiated-language)"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:sequence select="concat($context-prefix, '/redirect/?oid=', $oid)"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,9 @@
|
||||||
'/redirect/?oid=',
|
'/redirect/?oid=',
|
||||||
./targetItem/@oid,
|
./targetItem/@oid,
|
||||||
$params)"/>
|
$params)"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'"/>
|
||||||
<xsl:with-param name="target-item-title"
|
<xsl:with-param name="target-item-title"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="./targetItem/title"/>
|
select="./targetItem/title"/>
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,9 @@
|
||||||
./formatKey,
|
./formatKey,
|
||||||
'&publication=',
|
'&publication=',
|
||||||
./publicationId)"/>
|
./publicationId)"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
<xsl:with-param name="export-formatkey"
|
<xsl:with-param name="export-formatkey"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="./formatKey"/>
|
select="./formatKey"/>
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,8 @@
|
||||||
<xsl:param name="href" select="''" tunnel="yes"/>
|
<xsl:param name="href" select="''" tunnel="yes"/>
|
||||||
<xsl:param name="hreflang" select="''" tunnel="yes"/>
|
<xsl:param name="hreflang" select="''" tunnel="yes"/>
|
||||||
<xsl:param name="title" select="''" tunnel="yes"/>
|
<xsl:param name="title" select="''" tunnel="yes"/>
|
||||||
<xsl:param name="type" select="''" tunnel="yes"/>
|
<xsl:param name="type" select="''" tunnel="yes"
|
||||||
|
<xsl:param name="append-language-parameter" select='false'/>
|
||||||
|
|
||||||
<a>
|
<a>
|
||||||
<xsl:if test="./@href-property">
|
<xsl:if test="./@href-property">
|
||||||
|
|
@ -165,7 +166,21 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="$href != ''">
|
<xsl:if test="$href != ''">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="$href"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$append-language-parameter = 'true' and foundry:get-setting('append-language-parameter', '') = 'true'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($href, '?')">
|
||||||
|
<xsl:value-of select="concat($href, &lang=', $negotiated-language)"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="concat($href, '?lang=', $negotiated-language)" />
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$href"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="string-length($hreflang) > 0">
|
<xsl:if test="string-length($hreflang) > 0">
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,9 @@
|
||||||
<xsl:with-param name="breadcrumb-label"
|
<xsl:with-param name="breadcrumb-label"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="foundry:get-static-text('breadcrumbs', 'root')"/>
|
select="foundry:get-static-text('breadcrumbs', 'root')"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
<xsl:if test="count($data-tree//nav:categoryPath/nav:category) > 1">
|
<xsl:if test="count($data-tree//nav:categoryPath/nav:category) > 1">
|
||||||
<xsl:copy-of select="$breadcrumb-separator/*"/>
|
<xsl:copy-of select="$breadcrumb-separator/*"/>
|
||||||
|
|
@ -99,6 +102,9 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
<xsl:with-param name="breadcrumb-label" tunnel="yes" select="./@title"/>
|
<xsl:with-param name="breadcrumb-label" tunnel="yes" select="./@title"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
<xsl:if test="position() != last()">
|
<xsl:if test="position() != last()">
|
||||||
<xsl:copy-of select="$breadcrumb-separator/*"/>
|
<xsl:copy-of select="$breadcrumb-separator/*"/>
|
||||||
|
|
@ -148,6 +154,9 @@
|
||||||
<xsl:with-param name="href"
|
<xsl:with-param name="href"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="$data-tree//nav:categoryPath/nav:category[position() = 2]/@url"/>
|
select="$data-tree//nav:categoryPath/nav:category[position() = 2]/@url"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
|
@ -156,6 +165,9 @@
|
||||||
<xsl:with-param name="href"
|
<xsl:with-param name="href"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="$data-tree//nav:categoryPath/nav:category[position() = 1]/@url"/>
|
select="$data-tree//nav:categoryPath/nav:category[position() = 1]/@url"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
@ -208,6 +220,9 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
<xsl:with-param name="navigation-id" select="$navigation-id" tunnel="yes"/>
|
<xsl:with-param name="navigation-id" select="$navigation-id" tunnel="yes"/>
|
||||||
<xsl:with-param name="title" tunnel="yes">
|
<xsl:with-param name="title" tunnel="yes">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
|
@ -450,6 +465,9 @@
|
||||||
select="$navigation-links-tree"
|
select="$navigation-links-tree"
|
||||||
tunnel="yes"/>
|
tunnel="yes"/>
|
||||||
<xsl:with-param name="href" select="./@url" tunnel="yes"/>
|
<xsl:with-param name="href" select="./@url" tunnel="yes"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'"/>
|
||||||
<xsl:with-param name="title" tunnel="yes">
|
<xsl:with-param name="title" tunnel="yes">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$show-description-text and ./@description">
|
<xsl:when test="$show-description-text and ./@description">
|
||||||
|
|
@ -490,6 +508,9 @@
|
||||||
select="$navigation-links-tree"
|
select="$navigation-links-tree"
|
||||||
tunnel="yes"/>
|
tunnel="yes"/>
|
||||||
<xsl:with-param name="href" select="./@url" tunnel="yes"/>
|
<xsl:with-param name="href" select="./@url" tunnel="yes"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
<xsl:with-param name="title" tunnel="yes">
|
<xsl:with-param name="title" tunnel="yes">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$show-description-text and ./@description">
|
<xsl:when test="$show-description-text and ./@description">
|
||||||
|
|
@ -573,6 +594,9 @@
|
||||||
<xsl:with-param name="href"
|
<xsl:with-param name="href"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="./nav:url"/>
|
select="./nav:url"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'"/>
|
||||||
<xsl:with-param name="quicklink-description"
|
<xsl:with-param name="quicklink-description"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="./nav:description"/>
|
select="./nav:description"/>
|
||||||
|
|
@ -674,6 +698,9 @@
|
||||||
select="$navigation-links-tree"
|
select="$navigation-links-tree"
|
||||||
tunnel="yes"/>
|
tunnel="yes"/>
|
||||||
<xsl:with-param name="href" select="./@url" tunnel="yes"/>
|
<xsl:with-param name="href" select="./@url" tunnel="yes"/>
|
||||||
|
<xsl:with-param name="append-language-parameter"
|
||||||
|
tunnel="yes"
|
||||||
|
select="'true'" />
|
||||||
<xsl:with-param name="title" tunnel="yes">
|
<xsl:with-param name="title" tunnel="yes">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$show-description-text and ./@description">
|
<xsl:when test="$show-description-text and ./@description">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue