Foundry language selector now uses the available languages from the ContentPanel/GreetingItem if available.
git-svn-id: https://svn.libreccm.org/ccm/trunk@4475 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c7f8494b90
commit
bdc3b33151
|
|
@ -81,7 +81,9 @@
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="language-selector">
|
<xsl:template match="language-selector">
|
||||||
|
<xsl:if test="count($data-tree/cms:contentPanel/availableLanguages/language) != 1 and count($data-tree/nav:greetingItem/availableLanguages/language) != 1">
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="user" type="template-tag">
|
<foundry:doc section="user" type="template-tag">
|
||||||
|
|
@ -95,7 +97,21 @@
|
||||||
<xsl:template match="language-selector//language">
|
<xsl:template match="language-selector//language">
|
||||||
<xsl:variable name="language-layout-tree" select="./*"/>
|
<xsl:variable name="language-layout-tree" select="./*"/>
|
||||||
|
|
||||||
<xsl:for-each select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages/language">
|
<xsl:variable name="available-languages">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$data-tree/cms:contentPanel">
|
||||||
|
<xsl:copy-of select="$data-tree/cms:contentPanel//availableLanguages/*" />
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$data-tree/nav:greetingItem">
|
||||||
|
<xsl:copy-of select="$data-tree/nav:greetingItem//availableLanguages/*" />
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages" />
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:for-each select="$available-languages/language">
|
||||||
<xsl:apply-templates select="$language-layout-tree">
|
<xsl:apply-templates select="$language-layout-tree">
|
||||||
<xsl:with-param name="class"
|
<xsl:with-param name="class"
|
||||||
select="if (./@locale = $lang)
|
select="if (./@locale = $lang)
|
||||||
|
|
@ -107,6 +123,7 @@
|
||||||
select="foundry:get-static-text('', concat('language/', ./@locale))"/>
|
select="foundry:get-static-text('', concat('language/', ./@locale))"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="user" type="template-tag">
|
<foundry:doc section="user" type="template-tag">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue