after every 5 news, show the subscribe/supporter banner

pull/2505/head
Reinhard Müller 10 months ago committed by max.mehl
parent dbb2df5c2a
commit f7fe0b3554
Signed by: max.mehl
GPG Key ID: 2704E4AB371E2E92

@ -31,4 +31,7 @@
<include-news/>
</body>
<banner1><module id="banner-subscribe" /></banner1>
<banner2><module id="banner-become-supporter" /></banner2>
</html>

@ -103,6 +103,20 @@
]">
<xsl:sort select="@date" order="descending"/>
<!-- Before every 5 news, show a banner, depending on even or odd number of position in loop -->
<xsl:if test="position() mod 5 = 0">
<xsl:choose>
<!-- even number -->
<xsl:when test="position() mod 2 = 0">
<xsl:apply-templates select="/buildinfo/document/banner1/node()" />
</xsl:when>
<!-- odd number -->
<xsl:otherwise>
<xsl:apply-templates select="/buildinfo/document/banner2/node()" />
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- Display the news items -->
<xsl:apply-templates select="."/>

@ -34,4 +34,7 @@
<a class="learn-more" href="2020/index.html"/>
</p>
</body>
<banner1><module id="banner-subscribe" /></banner1>
<banner2><module id="banner-become-supporter" /></banner2>
</html>

Loading…
Cancel
Save