Search

My section artists has fields name (text input) and language (select box link).

My client would like her artists in pages of 10 sorted by language and then by name within each language.

I can group the data source output by language (sorted using xsl:sort) and sort it by name to create one long list, but this doesn't enable me to use the in-built data source pagination. My questions:

  1. Is there a way to customise a datasource to sort on a select box link field?
  2. How can I customise a datasource to sort on 2 criteria?

I am a 99% custom DS newbie but feel that this shouldn't be too tough?

I guess as an alternative I could use EXSLT to process the whole list on each page load, but I guess that would be process hungry.

not sure how many languages you are running and how you're displaying. but assuming you haven't got many languages you could do this two ways.

The good old way of having a datasource per language.

Otherwise if you're willing to go custom I would suggest creating two datasources. One which filters 'per-language' And the second one which is your aggregator. Modify the execute/grab function of the aggregator; and for-each language that you have call upon the first-datasource & execute for the language you would like. (remember you can pass your own 'custom' param-pool so you can modify the values there)

Then just join up the 'results' from each language and there you go you've got your pagination per language :)

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