Search

This is quite a tricky question, so I'll try to be as precise as possible: there are articles that have labels (Interview, Column, Blog, Video, etc) and the site is split into two parts: opinions (interviews, columns) and scientific (thesis, publications) based on these labels.

So, when I go to website.com/opinions I'd like to list all articles that have a label of the opinion type, and the same for science. By simply filtering the label field on these values, this is rather easy.

But now for the tricky bit: there are labels I do not want to list in either one of these pages, not even if they also have a label that woud make them listed. For instance, the label Video should never be shown on these pages, as they will get their own space.

Easy, you say: just add another filter: not: video and you're done. Well: no. It is not possible to mix the not: syntax with the normal IN filters, and adding another filter of the same type is also not possible (the select is grayed out, and the old filters is overwritten if I do try it;)).

So my question is: is this possible without writing a custom datasource?

Well, theoretically you could build a helper DS with the not: filter, outputting the IDs to the param pool, then filter your DS using these IDs. The problem here is: You can not paginate the helper datasource, so this will probably have performance implications with large datasets.

Hmm, so basically this means: write your own datasource, you lazy bastard? :)

Yeah, I am not aware of any other solution. But I know your SQL fu. You can do it.

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