B
B
boberskyibohdan2016-11-02 10:05:56
CMS
boberskyibohdan, 2016-11-02 10:05:56

How to organize a search by multiple parameters TV modx revolution?

How to organize a search by multiple parameters TV modx revolution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
display: block, 2016-11-02
@qork

Snippet using xPDO

$res = $modx->getObject('modResource', 1);
$tvs = $res->getMany('TemplateVarResources');
foreach ($tvs as $k => $tv) {
    $tvs[$k] = $tv->toArray();
}

Thus, in $tvs we will get an array of all TV fields (field id, resource id, value) of resource 1. Then you can finish the search to fit your needs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question