nurkka Posted 2 hours ago Share Posted 2 hours ago Hi all, when using the following selector, ProcessWire finds all pages, not only those with the CheckboxReversed "checkbox_export" checked. $ps = pages()->find('checkbox_export!=1, sort=id, include=hidden, status<' . Page::statusTrash); foreach($ps as $p){ var_dump($p->title); } As a workaround I added the following condition: $ps = pages()->find('checkbox_export!=1, sort=id, include=hidden, status<' . Page::statusTrash); foreach($ps as $p){ if ($p->hasField('checkbox_export')) var_dump($p->title); } I wonder if there is any "native" selector technique, where you can check if a field exists on a page. Something like "has_field", but that does not exists. At least I found nothing in the docs. Does anyone know the trick, if there is any? Link to comment Share on other sites More sharing options...
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