Answer the question
In order to leave comments, you need to log in
How to make a filtering form for the collections page?
I just started to learn MODX, googling only led to a solution using the paid mSearch plugin. Maybe there is something else? Maybe it is implemented by some other plugin?
Ideally, of course, understand how to process the get request from the form yourself and generate a page in accordance with it, but again, I just started learning and I would be very grateful if someone points in the right direction. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
There is a good tagmanager snippet, it works with GER, ajax filtering, working with TV
If you know php, a snippet is created, any php code is written in it.
and process it the way you want.
The craziest way to call another snippet in a snippet, like getresources , and pass it
in MODx has a powerful API. for example getCollection,
$q = $modx->newQuery('modResource', array('id:>' => 0, 'template' => 3));
$res = $modx->getCollection('modResource', $q);
var_export($res);
$q = $modx->newQuery('modResource', array('id:>' => 0, 'template' => 3));
$q->select('id,pagetitle');
if ($q->prepare() && $q->stmt->execute()) {
while ($row = $q->stmt->fetch(PDO::FETCH_ASSOC)) {
var_export($row);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question