Hello,
I need the pages tag to provide all cloned pages that have varying specific properties (in custom field).
I have an input form where I set the desired properties. First I have date from and date to fields. These I compare against a field on every page (date). No problems so far, however, now I have a bunch of multiselect inputs, like status can be "ok, denied, okbyteamleader" and a field "requesttype" that can be a ton of things like "plus time", "minus time", "vacancy", "sick", "meeting" and several more.
So what I want to do is to get all pages between date from and date to where the corresponding fields on each page contain any of the values selected (like all pages where the date field is between 2017-11-20 and 2017-12-12 and where the status field value is either "ok or "okbyteamleader" and where the requesttype field is either "plus time" or "minus time".
I hope you can understand what I want to do.
Anyway, I already asked about a boolean or operator for the custom_field function once and I know it doesn't exist, and that I could use cms:query to build my own query, but before I do that (as it seems to be a very daunting task) I wanted to ask: Could I compare a custom field against an array somehow, so it checks for all the values inside the given array? That would make life a lot easier and still wouldn't require an OR operator for custom_field.
Also, as a side question, is there an easy way to put a a php array (like from a $_POST variable into a couch array?
Best regards.
I need the pages tag to provide all cloned pages that have varying specific properties (in custom field).
I have an input form where I set the desired properties. First I have date from and date to fields. These I compare against a field on every page (date). No problems so far, however, now I have a bunch of multiselect inputs, like status can be "ok, denied, okbyteamleader" and a field "requesttype" that can be a ton of things like "plus time", "minus time", "vacancy", "sick", "meeting" and several more.
So what I want to do is to get all pages between date from and date to where the corresponding fields on each page contain any of the values selected (like all pages where the date field is between 2017-11-20 and 2017-12-12 and where the status field value is either "ok or "okbyteamleader" and where the requesttype field is either "plus time" or "minus time".
I hope you can understand what I want to do.
Anyway, I already asked about a boolean or operator for the custom_field function once and I know it doesn't exist, and that I could use cms:query to build my own query, but before I do that (as it seems to be a very daunting task) I wanted to ask: Could I compare a custom field against an array somehow, so it checks for all the values inside the given array? That would make life a lot easier and still wouldn't require an OR operator for custom_field.
Also, as a side question, is there an easy way to put a a php array (like from a $_POST variable into a couch array?
Best regards.