Search

I may be being completely dumb here but if I have a DS that has statistics like number of goals scored. How do I sort by that number?

I presumed that I sort by the node that contains the data, but its not sorting by it.

I have 40, 310 and 100.

By choosing Ascending, I get this:

40 310 100

Any ideas?

Yep being dumb.

Added data-type="number" and were golden.

Another way is by using the number field, and get your DS to sort by the field, you'll get what you are after.

Alistair, I could do that - but I have a DS that has different fields that need sorting for different lists. Basically running a statistics site for my team, and I would want to sort from Appearances, Goals, etc....So doing it actually in the xslt allows me to use the same DS for different places.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details