Torsten Baldes Posted July 2, 2019 Share Posted July 2, 2019 Hi, I'm using the core module FieldTypeSelector (like Lister) to be able to create custom lists of pages on my pages. e.g. show me pages with template=foo, somevalue=bar and someothervalue=foobar. Is there a way to use OR groups (https://processwire.com/docs/selectors/#or-groups) with FieldTypeSelector? This way I could build a list of pages which have somevalue=bar OR someothervalue=foobar As a selector this would look like this: template=foo, (somevalue=bar), (someothervalue=foobar) Is this possible? I know I could insert this as a _custom selector, but this would kind of defeat the purpose of FieldTypeSelector. Thanks! Link to comment Share on other sites More sharing options...
elabx Posted July 2, 2019 Share Posted July 2, 2019 I think there is no way around this currently. 1 Link to comment Share on other sites More sharing options...
dragan Posted July 2, 2019 Share Posted July 2, 2019 1 hour ago, Torsten Baldes said: I know I could insert this as a _custom selector, but this would kind of defeat the purpose of FieldTypeSelector. I'm not sure I understand. Are your client's editors using this to make selections? Or you (= the developer)? If the latter, why not use custom selector with something like title%=axa|client_name%=sbb ? Link to comment Share on other sites More sharing options...
Torsten Baldes Posted July 3, 2019 Author Share Posted July 3, 2019 15 hours ago, dragan said: I'm not sure I understand. Are your client's editors using this to make selections? Or you (= the developer)? If the latter, why not use custom selector with something like title%=axa|client_name%=sbb ? Most of the time other users/editors use this Field to "generate" a selection of posts/pages which are applicable for the topic of the current post. Something like "If you liked this post, then these posts could also be interesting to you". Link to comment Share on other sites More sharing options...
Robin S Posted July 3, 2019 Share Posted July 3, 2019 @Torsten Baldes, there has been an @todo note about adding OR-group support to InputfieldSelector since 2016. Quote @todo add support for "custom: OR-group" option (https://processwire.com/talk/topic/13116-or-selecters-for-different-fields/) Seeing as Ryan has been doing some work on InputfieldSelector recently it might be timely to open a request for this in the requests repo to bring it back to his attention. ? 3 Link to comment Share on other sites More sharing options...
arjen Posted July 5, 2019 Share Posted July 5, 2019 Ah, the or groups selector post ? We really needed this a few years ago. Unfortunately Ryan did not manage to implement this. No hard feelings though since this is not an easy task. But I do believe it should be developed since this is a big USP over other rule builders. ProcessWire can really shine with these kind of data structures. I eventually created a Process module which created pages has a sort of multiplier field of InputfieldSelector. The client could scope the main selector and add groups by adding more selectors. - Main Selector template=foo (InputfieldSelector) |-- Selector 1 (OR) somevalue=bar (repeatable field with InputfieldSelector) |-- Selector 2 (OR) someothervalue=foobar (etc) This fields eventually resolved in: "template=foo, (somevalue=bar), (someothervalue=foobar)". I created another Process Module we rendered these selectors in a list and created urls (using the great ProcessPageListerUrls). This might feel like overkill, but the client wanted to query complex selectors. 3 Link to comment Share on other sites More sharing options...
teppo Posted July 13, 2019 Share Posted July 13, 2019 Moderator note: this thread is about a core feature, so I'm moving it to the General Support area of the forum. Modules/Plugins area is intended for dedicated support threads of third party modules. Thanks! 1 Link to comment Share on other sites More sharing options...
Torsten Baldes Posted July 15, 2019 Author Share Posted July 15, 2019 On 7/3/2019 at 2:09 PM, Robin S said: @Torsten Baldes, there has been an @todo note about adding OR-group support to InputfieldSelector since 2016. Seeing as Ryan has been doing some work on InputfieldSelector recently it might be timely to open a request for this in the requests repo to bring it back to his attention. ? Thanks! I just posted a feature request. 1 Link to comment Share on other sites More sharing options...
kixe Posted August 11, 2020 Share Posted August 11, 2020 On 7/3/2019 at 2:09 PM, Robin S said: @Torsten Baldes, there has been an @todo note about adding OR-group support to InputfieldSelector since 2016. https://processwire.com/talk/topic/13116-or-selecters-for-different-fields/ Unfortunately the thread is not accessible for everybody. Why? Quote You do not have permission to view this content. On 7/15/2019 at 8:57 AM, Torsten Baldes said: Thanks! I just posted a feature request. ... which could be found here: https://github.com/processwire/processwire-requests/issues/317 For everyone who is interested in this function. Please vote or add a comment. Link to comment Share on other sites More sharing options...
LostKobrakai Posted August 11, 2020 Share Posted August 11, 2020 3 minutes ago, kixe said: Unfortunately the thread is not accessible for everybody. Why? It's a topic on the lister pro support forum, which is only accessible to people with lister pro licenses. Link to comment Share on other sites More sharing options...
kixe Posted August 11, 2020 Share Posted August 11, 2020 @LostKobrakai If the thread doesn't reveal any ListerPro secrets and provide interesting informations about FieldtypeSelector/ InputfieldSelector, it could be moved and made available to everybody, since FieldtypeSelector is not Pro. ? 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