joe_g Posted March 31, 2017 Share Posted March 31, 2017 hi, i came across something that is possibly a bug, (or maybe something I'm not understanding): I have several /thing under /things, so like /things/things1. "Thing" contains a page field "tags". Tags is a list of checkboxes. $pages->get('/things')->children('tags.name!=xx,limit=10') My problem is that this query doesn't return the children with no (0) 'tags' checked (it's a page field, checkboxes, for tagging). I'd like to create a query that returns all the pages that doesn't have the tag "xx", regardless if no tags or some tags have been selected. thanks! Link to comment Share on other sites More sharing options...
LostKobrakai Posted March 31, 2017 Share Posted March 31, 2017 It's not a bug, but just how processwire does handle this kind of selector. If you need empty tags as well use the following: $pages->find("parent=/things, (tags.name!=xx), (tags=''),limit=10") 1 Link to comment Share on other sites More sharing options...
joe_g Posted March 31, 2017 Author Share Posted March 31, 2017 thank you!, I realise things has improved with v.3. It seems I can also do: $result = $pages->get('/all')->children('tags!=[name=xx],limit=10'); 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