xsl/atom,rss,podcast: configurable $maxitems
This commit is contained in:
parent
b7da47796c
commit
e81598ac55
|
@ -13,6 +13,7 @@
|
|||
indent="yes"/>
|
||||
|
||||
<xsl:variable name="baseurl">https://www.c3d2.de/</xsl:variable>
|
||||
<xsl:variable name="maxitems">10</xsl:variable>
|
||||
|
||||
<xsl:template match="news">
|
||||
<feed xml:lang="de">
|
||||
|
@ -35,7 +36,7 @@
|
|||
<xsl:for-each select="newsfile">
|
||||
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
|
||||
<xsl:variable name="newsfile" select="."/>
|
||||
<xsl:if test="(position() <= 10) and
|
||||
<xsl:if test="(position() <= $maxitems) and
|
||||
starts-with(substring-after(substring-after($newsfile, '/'), '/'), $prefix)">
|
||||
|
||||
<xsl:for-each select="document($newsfile)/item">
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<xsl:include href="common.xsl" />
|
||||
|
||||
<xsl:variable name="baseurl">http://www.c3d2.de/</xsl:variable>
|
||||
<xsl:variable name="maxitems">23</xsl:variable>
|
||||
<xsl:param name="selection" select="''"/>
|
||||
|
||||
<xsl:template match="news">
|
||||
|
@ -101,7 +102,7 @@
|
|||
|
||||
<xsl:for-each select="newsfile">
|
||||
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
|
||||
<xsl:if test="position() <= 23">
|
||||
<xsl:if test="position() <= $maxitems">
|
||||
<xsl:choose>
|
||||
<xsl:when test="($selection = 'pentaradio' or $selection = 'pentamedia') and
|
||||
starts-with(., 'content/news/pentaradio') and
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
indent="yes"/>
|
||||
|
||||
<xsl:variable name="baseurl">https://www.c3d2.de/</xsl:variable>
|
||||
<xsl:variable name="maxitems">10</xsl:variable>
|
||||
|
||||
<xsl:template match="news">
|
||||
<xsl:element name="rss">
|
||||
|
@ -29,7 +30,7 @@
|
|||
<xsl:for-each select="newsfile">
|
||||
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
|
||||
<xsl:variable name="newsfile" select="."/>
|
||||
<xsl:if test="(position() <= 10) and
|
||||
<xsl:if test="(position() <= $maxitems) and
|
||||
starts-with(substring-after(substring-after($newsfile, '/'), '/'), $prefix)">
|
||||
|
||||
<xsl:apply-templates select="document(.)/item">
|
||||
|
|
Loading…
Reference in New Issue