aboutsummaryrefslogtreecommitdiff
path: root/source/99_result/category
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-08-11 22:51:48 +0200
committerAdrian Kummerlaender2014-08-11 22:51:48 +0200
commit8e72c0f8a28c8e4593a311ea465de00bb77646a7 (patch)
tree393f6cb089ad739fbb64e31c8acb2b5352ed98a4 /source/99_result/category
parent49768b7c10fd6466edcd8262587bf142c919ccb5 (diff)
downloadblog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.tar
blog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.tar.gz
blog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.tar.bz2
blog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.tar.lz
blog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.tar.xz
blog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.tar.zst
blog.kummerlaender.eu-8e72c0f8a28c8e4593a311ea465de00bb77646a7.zip
Added category overview heading and randomized order
* while articles can be ordered by e.g. date there is no useful order for the pages in a given category ** this is why the order of pages on category overview pages is now random (in each generation)
Diffstat (limited to 'source/99_result/category')
-rw-r--r--source/99_result/category/category.xsl12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/99_result/category/category.xsl b/source/99_result/category/category.xsl
index ef6f388..2b54348 100644
--- a/source/99_result/category/category.xsl
+++ b/source/99_result/category/category.xsl
@@ -2,6 +2,7 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:math="http://exslt.org/math"
>
<xsl:include href="[utility/master.xsl]"/>
@@ -17,9 +18,18 @@
</xsl:template>
<xsl:template match="category/entry">
+ <h3>
+ <xsl:text>All pages categorized as &#187;</xsl:text>
+ <xsl:value-of select="@handle"/>
+ <xsl:text>&#171; in random order</xsl:text>
+ </h3>
<div class="archiv columns">
<ul class="prettylist">
- <xsl:apply-templates />
+ <xsl:for-each select="page">
+ <xsl:sort select="position() mod math:random()" order="descending"/>
+
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
</ul>
</div>
</xsl:template>