entschleunigung Posted May 16, 2019 Posted May 16, 2019 hello, is there a possibility to define exceptions in a selector? this is my selector: $selector = "template=expertsItem, location=$location, department=$department, sort=expertSurname"; i would like this selector to give me everything from $ department but not the department with id 2131, for example. i have tried the following, unfortunately without success $selector = "template=expertsItem, location=$location, department=$department, department!=2131, sort=expertSurname"; do you have any idea for me how to solve this? thank you
dragan Posted May 16, 2019 Posted May 16, 2019 $selector = "template=expertsItem, location=$location, department=$department, id!=2131, sort=expertSurname"; ? or if you're trying to exlude the page you're on, you can use id!=page.id 1
ottogal Posted May 16, 2019 Posted May 16, 2019 You could try $matches = $pages->find("template=expertsItem, location=$location, department=$department, sort=expertSurname")->not("department=2131"); 1
elabx Posted May 16, 2019 Posted May 16, 2019 If any of the alternatives work I'd still wonder why his original code wouldn't work. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now