aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-09-14 13:32:32 +0200
committerAdrian Kummerlaender2014-09-14 13:32:32 +0200
commit6692cc00e200f1989cf4aa41e2eac90d4a742976 (patch)
treeca96ae1223a355ee4afb89020350a7085ac2455f
parent808aef2afb9396a29982d347123ae45cc6787a87 (diff)
downloadblog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.tar
blog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.tar.gz
blog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.tar.bz2
blog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.tar.lz
blog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.tar.xz
blog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.tar.zst
blog.kummerlaender.eu-6692cc00e200f1989cf4aa41e2eac90d4a742976.zip
Fixed total page value of paginated article source
* changed "floor" to "ceiling" to correctly handle uneven article counts
-rw-r--r--source/02_meta/paginated_articles.xsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/02_meta/paginated_articles.xsl b/source/02_meta/paginated_articles.xsl
index 9fb38a9..4ce71a2 100644
--- a/source/02_meta/paginated_articles.xsl
+++ b/source/02_meta/paginated_articles.xsl
@@ -11,7 +11,7 @@
<target mode="plain" value="paginated_articles.xml"/>
</xsl:variable>
-<xsl:variable name="total" select="floor(count(datasource/articles/entry) div 2)"/>
+<xsl:variable name="total" select="ceiling(count(datasource/articles/entry) div 2)"/>
<xsl:template match="articles/entry[position() mod 2 = 1]">
<entry index="{floor(position() div 2)}" total="{$total}">