Search

Hi, everyone!

We (our small team) have run into the following problem, and got completely stuck without knowing what to do.

We have a section say "product" it contains e.g. 1000 entries. All the entries can be created or updated with the help of csv.

Then we want to make the say group filtering. That is every field may have any number of unique values for all the entries. Say there are 5 product types for all the 1000 entries. And the filtering group is the list of those unique values out of one field.

There's nothing to do if we want to get just the unique listing for all the products (achievable by means of Section Schemas thanks to Nick Dunn), but if we have Producttype and Productusage and there are 5 types and 10 usages for 1000 entries and if we want to get the list of all the unique usages for every type we get into trouble as for us it can be done only by means of xsl and it's not that good to have very long list of goods in xml and filter them again only in xsl.

Maybe anyone can help?

I understood you up until the point you made that Section Schemas will not work for you.

My suggestion is to use a Tag List field with "Existing values" selected in the "Suggestion list" option. Once you've created all your entries, the tag list field will show all possible unique values for the field underneath the input box. Using Section Schemas you can create a schema data source for this section and attach to your page, getting these values into the XML.

The alternative is to write a custom data source to perform a DISTINCT SQL query against the data table for the fields you want to filter on. But since the Tag List field does this already you can use that and not have to write anything custom.

Does that do what you need?

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