Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Merge pull request #38 from beaubbe/patch-3
Browse files Browse the repository at this point in the history
Fix in master-share-metas template
  • Loading branch information
nitriques committed Dec 5, 2014
2 parents d48ac18 + 798ea13 commit 44deae0
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions workspace/utilities/lib/master-share-metas.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,33 @@
</xsl:when>
<xsl:otherwise>
<xsl:variable name="page-metas" select="/data/page-metas/entry[1]" />
<xsl:variable name="image-path">
<xsl:choose>
<xsl:when test="string-length($page-metas/image-partage) != 0">
<xsl:value-of select="concat($root, '/workspace', $page-metas/image-partage/@path, '/', $page-metas/image-partage/filename)" />
</xsl:when>
<xsl:when test="string-length($site-share-image/filename) != 0">
<xsl:value-of select="concat($root, '/workspace', $site-share-image/@path, '/', $site-share-image/filename)" />
</xsl:when>
</xsl:choose>
</xsl:variable>

<xsl:call-template name="html-metas">
<xsl:with-param name="description" select="$page-metas/description" />
</xsl:call-template>
<xsl:call-template name="open-graph">
<xsl:with-param name="description" select="$page-metas/description" />
<xsl:with-param name="image-path" select="$image-path" />
<xsl:with-param name="image" select="''" />
</xsl:call-template>
<xsl:call-template name="twitter-card">
<xsl:with-param name="description" select="$page-metas/description" />
<xsl:with-param name="image-path" select="$image-path" />
<xsl:with-param name="image" select="''" />
</xsl:call-template>

<xsl:choose>
<xsl:when test="string-length($page-metas/image-partage) != 0">
<xsl:call-template name="open-graph">
<xsl:with-param name="description" select="$page-metas/description" />
<xsl:with-param name="image" select="$page-metas/image-partage" />
</xsl:call-template>
<xsl:call-template name="twitter-card">
<xsl:with-param name="description" select="$page-metas/description" />
<xsl:with-param name="image" select="$page-metas/image-partage" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="open-graph">
<xsl:with-param name="description" select="$page-metas/description" />
</xsl:call-template>
<xsl:call-template name="twitter-card">
<xsl:with-param name="description" select="$page-metas/description" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>

<xsl:call-template name="fb-app-id" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Expand Down Expand Up @@ -175,4 +179,4 @@
</xsl:choose>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>

0 comments on commit 44deae0

Please sign in to comment.