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>
<xsl:template match="atom:entry" mode="wiki"> <xsl:template match="atom:entry" mode="wiki">
<item date="{atom:updated}" class="wiki"> <xsl:variable name="title" select="atom:title"/>
<header>C3D2 Wiki</header> <!-- Don't repeat any titles -->
<footer>by <xsl:value-of select="atom:author/atom:name"/></footer> <xsl:if test="not(preceding-sibling::atom:entry/atom:title = $title)">
<content-text><xsl:value-of select="atom:title"/></content-text> <item date="{atom:updated}" class="wiki">
<link><xsl:value-of select="atom:link[@rel='alternate'][1]/@href"/></link> <header>C3D2 Wiki</header>
</item> <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>
<xsl:template match="item" mode="news"> <xsl:template match="item" mode="news">

View File

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