Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Group 1 = Category | Combo Box
Group 2 = Keywords | Tag field
Category Template
Snippet = [[cateName]]
$get = modX::sanitize($_GET, $modx->sanitizePatterns);
$tag = ucfirst(urldecode($get['categories']));
$tag = str_replace("-"," ", $tag);
$modx->setPlaceholder('cateName', $tag);
Title: [[+cateName]]
<h3>Article Tags</h3>
<ul>[[TaggerGetTags? &resources=`[[*id]]` &groups=`2` &rowTpl=`tag_keywords_tpl` &target=`2`]]</ul>
<li><a href="[[+uri]]">[[+tag]]</a></li>
[[TaggerGetTags? &groups=`1` &rowTpl=`tag_categories_tpl` &target=`2`]]
<p><a href="[[+uri]]">[[+tag]]</a> ([[+cnt]])</p>
[[!getResources? &where=`[[!TaggerGetResourcesWhere? &tags=`Books,Vehicles` &where=`{"isfolder": 0}`]]`]]
&where=`[[!TaggerGetResourcesWhere? &tags=`sun,women` &matchAll=`1`]]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment