Search

We've got a product section that contains a few thousand entries. Each entry has – beside other fields – a name, an id and a colour. While the id is unique, different colour variants of a products may share the same name.

The site we are building provides a product overview showing only the first colour of a product and while we have a few thousand entries in total the different overviews won't have to show more than hundred products. Creating the overviews in the XSL templates won't work because either Symphony or the XSL processor will time out while trying to process the full list of products.

Now I'd like our overview Data Source to only return distinct names – something I cannot achieve using the Data Source editor. My question is: does anyone know a simple way to customise our Data Source to achieve this filtering?

I have dealt with this exact issue, and what worked well for us was adding another field, variant of. This field linked to a master product, and then our DS only returned products that didn't contain variants. On the detail pages, we then pulled in the variant prosucts

Ah, that's an idea.

But I'm not sure, if it's feasible for us, because we are importing from an external source and this will make the section structure more complex. I'm really trying to avoid entry associations. But an additional field to mark the first entry might be an idea. I will have to think about this.

Thanks, Brendan.

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