Jump to content

$pages->find() page or field equal value, separated by a pipe "|" symbol


creativejay
 Share

Recommended Posts

Apologies if this has been covered. I tried a search but didn't hit the usecase I'm after.

I currently have category pages listing their children products. Someone asked me to put a product in multiple categories, so I created a Page Reference field called prod_othercategories which lets a user pick multiple product category pages.

When I try to output a list of products for a category page, I came around to the following selector:

$pages->find("prod_othercategories|parent=$page, template=prod_series, sort=title, prod_status_pages!=1554|1559|1560|4242");

Only the first selector item is giving me trouble, but I'm including the entire string in case something is conflicting and I'm not realizing it.

The output is currently only outputting matches for "parent" and ignoring prod_othercategories. I tried listing parent first in the selector but it had no effect.

Appreciate if someone could help me with this! Thanks!

Link to comment
Share on other sites

2 hours ago, creativejay said:

Ah well that's embarrassing.

No need to be ?. Although this feature has been, relatively,  around for a while, it's not easy keeping up with all the new stuff. That selectors page has been updated several times with new stuff so it's good to have a fresh look at it. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...