5 users online. Create an account or sign in to join them.Users
Article x of y
This is an open discussion with 3 replies, filed under General.
Search
Right; I just discovered <xsl:number>
<xsl:number value="position()" /> of <xsl:number value="last()" /> is the(/an) answer to my question.
You could just use <xsl:value-of select="position()" />.
Thanks, Nils!
Create an account or sign in to comment.
Hi,
I'm very new to Symphony (and xslt), but after a weekend of tinkering, I believe I'm a convert.
Please forgive the naïve nature of this query.
I've found that I can output the total number of entries I have for a data source with pagination and '@total-entries', but I can't figure out how I would output the current-entry number (if, for example, I had 10 testimonials, and I wanted to have something like, 'number 2 of 10').
Is there a relatively straightforward way of getting something like a 'current-entry' variable?
I have come from Expression Engine where I had {count} and {absolute_count} variables at hand, but I believe a different type of thinking is required (which I definitely haven't got to grips with, yet).
Thanks, David