Получаем значение параметра
tags.CatalogLists.FieldsValue
<?php $tag = filter_input(INPUT_GET,"option_brand",FILTER_SANITIZE_STRING) ; return $tag;
Сниппет запроса заголовка :
tags.CatalogList_h1
<?php global $modx; $tag = $modx->runSnippet('tags.CatalogLists.FieldsValue'); $curentTitle = $modx->resource->get('pagetitle'); $docs =null; //кешируем запрос между сниплетами if (!isset($GLOBALS['nedleTag']) ) { // $docs = $modx->getObject('modResource', array( // 'parent' => 123, // //'alias'=>$tag, // 'link_attributes'=>$tag // )); $where = $modx->newQuery('modResource'); $where->leftJoin('modTemplateVarResource', 'TemplateVarResources'); $where->leftJoin('modTemplateVar', 'tv', "tv.id=TemplateVarResources.tmplvarid"); $where->limit(1);// Лимит $where->where(array( 'tv.name' => 'tags.urlparam', // Имя TV 'TemplateVarResources.value' => $tag,// Значение TV 'parent' => 123// Родитель )); $docs = $modx->getObject('modResource', $where); if(!$docs){ $docs = -1; } $GLOBALS['nedleTag'] = $docs; }else{ $docs = $GLOBALS['nedleTag']; } if($docs === -1){ return $curentTitle; }else{ $tag_pagetitle = $docs->get('pagetitle'); return $tag_pagetitle; }