Page List filter with array and change logical operation
Permalink
Hi,
I have a bit of a situation that require some assistance if possible.
I searched a lot, and the threads that exist did put me in some direction but I need further help.
I'm trying to build a Page List that retrieves multiple custom select attributes of the current page and displays pages that have those values.
this is what I have:
What I want: A page list that retrieves All pages of value 1 OR value2 OR any other value from multiple attributes taken from current page.
Can someone help with this?
Thanks
I have a bit of a situation that require some assistance if possible.
I searched a lot, and the threads that exist did put me in some direction but I need further help.
I'm trying to build a Page List that retrieves multiple custom select attributes of the current page and displays pages that have those values.
this is what I have:
$list = new \Concrete\Core\Page\PageList(); $currentOptions = $c->getCollectionAttributeValue('at_news'); $values = array(); if (is_object($currentOptions)) { echo '<div class="options">'; $first = true; foreach ($currentOptions as $v) { if ( $first ){ $first = false; echo $v; //This makes it retricted to AND, I want OR. //$list->filterByAtNews($v); $values[] = $v; } else { echo ', ' . $v;
Viewing 15 lines of 41 lines. View entire code block.
What I want: A page list that retrieves All pages of value 1 OR value2 OR any other value from multiple attributes taken from current page.
Can someone help with this?
Thanks