We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5904
    • 58 Posts
    I've been exploring Revo for a few months after years with Evo. It's been a steep learning with Revo doing some tasks quite differently. For example, filtering content based on user input. I used to do this in Evo with the Ditto &filter parameter, eg:

    <?php 
    ...
    $filter = "content," . $filterstring . ",7";
    $params['filter'] = $filter;
    ...
    $output = $modx->runSnippet('Ditto',$params);
    return $output;
    ?>


    With help from the docs and several posts (love this community! smiley ) I discovered a way to filter results with getResources, eg:

    <?php 
    ...
    $where = $modx->toJSON(
        array(
        'content:LIKE' => '%' . $filterstring . '%',
        )
    ); #echo $where;
    $params = array(
        'elementClass' => 'modSnippet',
    ...
        'where' => $where,
    );
    ...
    $output = $modx->runSnippet('getResources',$params);
    ?>


    Hope this helps. Do you know other ways to do this?