0 users online. Create an account or sign in to join them.Users

Search

PF 2016 everybody!

I am having trouble with using a negation filter on system id field with an output parameter.

E.g.:

  • not:{$ds-first.system-id} - not working
  • not-regexp:{$ds-first.system-id} - not working

Now, this works: not:1, but I need the value to be a parameter.

Furthermore, what I actually need is to filter multiple parameters, like

not:{$ds-first.system-id},{$ds-second.system-id}

so the opposite of an usual "including" filter like

{$ds-first.system-id},{$ds-second.system-id}

Is it doable?

Thanks.

PS: Hope not another trolling post of mine :/ :)

I think it's technically possible, for some reason this sounds familiar but I can't quite recall on which project / datasource I needed this functionality. I'll try having a look just in case I had some core modifications which I intended to put a PR on and never did.

Thanks very much @gunglien.

I will want to try it out with SymQL in the meantime, but would be great to have such logic available within the UI.

@juro just had a look I have the following working inside the datasource file:

'system:id' => 'not: {$ds-name.related-id}'

There is a good chance I might have fiddled with a few things but can you check if that works for you if not I'll try to look/compare core changes. I can probably find out the exact changes I would have made by tomorrow.

I use this method relatively often for including "related" content on single entry pages - just checked the two latest projects in which I included negation logic and my datasource settings for filtering by System ID looked like this:

  • not:{$ds-project.system-id} (ds-param in Symphony 2.6.3)
  • not: {$item-id} (url-param in Symphony 2.5.2)

Both are working as expected and I can't remember having any problems with this syntax so far. What version of Symphony are you working with?

As far as I can remember I never tried combining negation logic with multiple IDs though... will give this a try in one of the mentioned projects as soons as I find some time!

Guys, tried it once again based on your responses and it works. Definitely not sure what was the issue, as I did everything as before, with alterations and everything.

I will report if I sniff out something other than my socks.

NB, I'm using Symphony 2.6.3, but let's have this one on my head for now.

Thanks! Vuav ... this one's a cooler.

In any case, I owe you a beer.

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