5 users online. Create an account or sign in to join them.Users

Search

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

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details