xsl/portal2items: uniq wiki tiles

This commit is contained in:
Astro 2013-11-12 23:49:29 +01:00
parent 28315c0a52
commit da88aa44ec
2 changed files with 17 additions and 7 deletions

View File

@ -61,12 +61,23 @@
</xsl:template>
<xsl:template match="atom:entry" mode="wiki">
<item date="{atom:updated}" class="wiki">
<header>C3D2 Wiki</header>
<footer>by <xsl:value-of select="atom:author/atom:name"/></footer>
<content-text><xsl:value-of select="atom:title"/></content-text>
<link><xsl:value-of select="atom:link[@rel='alternate'][1]/@href"/></link>
</item>
<xsl:variable name="title" select="atom:title"/>
<!-- Don't repeat any titles -->
<xsl:if test="not(preceding-sibling::atom:entry/atom:title = $title)">
<item date="{atom:updated}" class="wiki">
<header>C3D2 Wiki</header>
<footer>
<xsl:text>by </xsl:text>
<xsl:value-of select="atom:author/atom:name"/>
<xsl:for-each select="following-sibling::atom:entry[atom:title = $title]/atom:author/atom:name">
<xsl:text>, </xsl:text>
<xsl:value-of select="normalize-space(.)"/>
</xsl:for-each>
</footer>
<content-text><xsl:value-of select="atom:title"/></content-text>
<link><xsl:value-of select="atom:link[@rel='alternate'][1]/@href"/></link>
</item>
</xsl:if>
</xsl:template>
<xsl:template match="item" mode="news">

View File

@ -318,7 +318,6 @@
chaosupdates
pentaradios?
space status
wiki in only 1 tile?
-->
<!-- All items... -->