Good evening everyone!
I filter the elements on the site with ModX Evo. In my ProjectFilter snippet, I call the Ditto snippet with the necessary parameters for filtering. I see in $ html after processing that placeholders are substituted, but the call to the snippet remains the text "[! Get_multi_image ...]]". Although there should be a picture (in the directory the same template is used, and it is displayed).
I suspect that the problem may be due to the fact that I call Ditto from my snippet. Tell me, how can I solve it?
//////////////// //snippet ProjectFilter //////////////// <?php $pfType = (isset($_POST['pf']['select26'])) ? cleanText($_POST['pf']['select26']) : ''; //Параметры и вызов Ditto из сниппета $params['depth'] = 2; $params['tpl'] = 'project_filter_tpl'; // Простой вызов шаблона... if (!empty($pfType)) $params['filter'] = 'tv_prod_18,'.$pfType.',1'; $html = $modx->runSnippet('Ditto', $params); //вызываем Ditto return $html; function cleanText($text){ $text = htmlentities($text, ENT_QUOTES); $text = strip_tags($text); $text = trim($text); $text = mysql_real_escape_string($text); return $text; } ?> //////////////// //chunk project_filter_tpl //////////////// <a href="[~[+id+]~]" rel="[+id+]"><img src="assets/classes/timthumb/timthumb.php?src=[!get_multi_image? &tvname=`md_gallery` &docid=`[+id+]` &number=`0`!]&w=231&h=144&zc=1" /></a> //////////////// //snippet get_multi_image //////////////// <?php $tvf = $modx->getTemplateVar($tvname, "*", $docid); $fotoArr=json_decode($tvf['value']); return $fotoArr[0][$number]; ?>