I’d just like to add that arguably the simplest solution, at least if you’re familiar with sql, would be to code your own snippet to build the custom search filters. For example, to grab a resultset of documents for a TV called ’marque’ with value ’Ford’ you’d use this SQL join on the three modx tables concerned: site_content, site_tmplvars and site_tmplvar_contentvalues (prefixed modx_):
$id=1; //doc id of document container for the cars
$marque = 'Ford'; // $_POST['marque'] from user-submitted form
$sql = 'SELECT
a.id,
a.pagetitle,
FROM modx_site_content AS a
LEFT JOIN modx_site_tmplvar_contentvalues AS b
ON a.id = b.contentid
LEFT JOIN modx_site_tmplvars AS c
ON b.tmplvarid = c.id
WHERE a.published = "1"
AND a.deleted = "0"
AND a.parent = "'.$id.'"
AND b.value = "'.$marque.'"
AND c.name = "marque"
ORDER BY postdate DESC';
$result = $modx->db->query($sql);
if ($result && mysql_num_rows($result)>0) {
// do stuff with the result
}
All you need to do is create an html form to submit the marque value to the snippet and so you have a basic filter. You could also of course output the list of marques from the database with another sql call, and ensure the selected value is set to $_POST[’marque’].