Page List filter with array and change logical operation


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.
            $values[] = $v;
        } else {
            echo ', ' . $v;

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?

View Replies: