Include newsletter into news feeds just like other news
All checks were successful
the build was successful
All checks were successful
the build was successful
This commit is contained in:
parent
4d34c6d9d5
commit
b2bfeda55f
@ -1,2 +1,4 @@
|
||||
news/*/news-*:[avm]
|
||||
news/*/.news-*:[avm]
|
||||
news/nl/nl-*:[avm]
|
||||
news/nl/.nl-*:[avm]
|
||||
|
@ -2,6 +2,10 @@ news/$thisyear/news-*:[front-page]
|
||||
news/$lastyear/news-*:[front-page]
|
||||
news/$thisyear/.news-*:[front-page]
|
||||
news/$lastyear/.news-*:[front-page]
|
||||
news/nl/nl-$thisyear*:[front-page]
|
||||
news/nl/nl-$lastyear*:[front-page]
|
||||
news/nl/.nl-$thisyear*:[front-page]
|
||||
news/nl/.nl-$lastyear*:[front-page]
|
||||
events/$thisyear/event-*:[front-page]
|
||||
tools/frontpage/*:[]
|
||||
tools/static-elements/element-*:[]
|
||||
|
15
index.xsl
15
index.xsl
@ -36,21 +36,6 @@
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!--display dynamic list of newsletters items-->
|
||||
<xsl:template match="all-newsletters">
|
||||
<xsl:call-template name="fetch-newsletters">
|
||||
<xsl:with-param name="nb-items" select="0" />
|
||||
</xsl:call-template>
|
||||
|
||||
<!--xsl:element name="p">
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/news/news.html</xsl:attribute>
|
||||
<xsl:attribute name="class">learn-more</xsl:attribute>
|
||||
<xsl:call-template name="more-news" /><xsl:text></xsl:text>
|
||||
</xsl:element>
|
||||
</xsl:element-->
|
||||
</xsl:template>
|
||||
|
||||
<!--display dynamic list of event items-->
|
||||
<xsl:template match="all-events">
|
||||
<!-- Current events -->
|
||||
|
@ -20,10 +20,9 @@
|
||||
<xsl:value-of select="/buildinfo/@date" />
|
||||
</xsl:variable>
|
||||
|
||||
<!-- show news except those in the future, but no newsletters -->
|
||||
<!-- show news except those in the future -->
|
||||
<xsl:for-each select="/buildinfo/document/set/news
|
||||
[translate (@date, '-', '') <= translate ($today, '-', '')
|
||||
and not (@type = 'newsletter')]">
|
||||
[translate (@date, '-', '') <= translate ($today, '-', '')]">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
|
||||
<!-- begin: news entry -->
|
||||
|
@ -2,3 +2,7 @@ news/$thisyear/news-*:[]
|
||||
news/$lastyear/news-*:[]
|
||||
news/$thisyear/.news-*:[]
|
||||
news/$lastyear/.news-*:[]
|
||||
news/nl/nl-$thisyear*:[]
|
||||
news/nl/nl-$lastyear*:[]
|
||||
news/nl/.nl-$thisyear*:[]
|
||||
news/nl/.nl-$lastyear*:[]
|
||||
|
@ -14,8 +14,8 @@
|
||||
<xsl:element name="dl">
|
||||
<xsl:attribute name="id">press-releases</xsl:attribute>
|
||||
|
||||
<!-- Show news except those in the future, but no newsletters -->
|
||||
<xsl:for-each select="/buildinfo/document/set/news[translate(@date,'-','')<=translate($today,'-','') and not(@type='newsletter')]">
|
||||
<!-- Show news except those in the future -->
|
||||
<xsl:for-each select="/buildinfo/document/set/news[translate(@date,'-','')<=translate($today,'-','')]">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
|
||||
<!-- A news entry -->
|
||||
|
@ -79,18 +79,6 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Show a single newsletter item -->
|
||||
<xsl:template name="newsletter">
|
||||
<xsl:variable name="link">
|
||||
<xsl:value-of select="link" />
|
||||
</xsl:variable>
|
||||
<li>
|
||||
<a href="{link}">
|
||||
<xsl:value-of select="title" />
|
||||
</a>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Show a single event -->
|
||||
<xsl:template name="event">
|
||||
<xsl:param name="header" select="''" />
|
||||
|
@ -19,9 +19,7 @@
|
||||
|
||||
<xsl:for-each select="/buildinfo/document/set/news[
|
||||
translate(@date, '-', '') <= translate($today, '-', '')
|
||||
and ($tag = '' or tags/tag[@key] = $tag or tags/tag = $tag)
|
||||
and not(tags/tag = 'newsletter' or tags/tag[@key] = 'newsletter')
|
||||
and not( @type = 'newsletter' ) ]"> <!-- Legacy -->
|
||||
and ($tag = '' or tags/tag[@key] = $tag or tags/tag = $tag)]">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
|
||||
<xsl:if test="$nb-items = '' or position() <= $nb-items">
|
||||
@ -33,29 +31,8 @@
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!--display dynamic list of (not yet tagged) newsletters items-->
|
||||
|
||||
<xsl:template name="fetch-newsletters">
|
||||
<xsl:param name="today" select="/buildinfo/@date" />
|
||||
<xsl:param name="nb-items" select="''" />
|
||||
|
||||
<xsl:for-each select="/buildinfo/document/set/news[
|
||||
translate(@date, '-', '') <= translate($today, '-', '')
|
||||
and (tags/tag[@key] = 'newsletter' or tags/tag = 'newsletter'
|
||||
or @type = 'newsletter' ) ]">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
|
||||
<xsl:if test="$nb-items = '' or position() <= $nb-items">
|
||||
<xsl:call-template name="newsletter" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--display dynamic list of tagged event items-->
|
||||
|
||||
<xsl:template name="fetch-events">
|
||||
|
Loading…
Reference in New Issue
Block a user