xsl/common: always match item/image to display news logos, not only in xsl/xhtml5

This commit is contained in:
Astro 2011-07-13 22:21:00 +02:00
parent dc71ae8429
commit 5a72539c71
1 changed files with 24 additions and 0 deletions

View File

@ -69,6 +69,30 @@
class="{@class}"/>
</xsl:template>
<!-- Bilder in News-Einträgen haben Pfad immer relativ zu /images/news/ -->
<xsl:template match="item/image">
<xsl:variable name="path">
<xsl:call-template name="normalize-path">
<xsl:with-param name="path">
<xsl:choose>
<xsl:when test="contains(., '://')">
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($baseurl, 'images/news/', .)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<img
src="{$path}"
title="{@title}"
alt="{@title}"
class="{@class}"/>
</xsl:template>
<xsl:template match="link">
<xsl:variable name="href">
<xsl:call-template name="make-href">