Created
November 30, 2018 00:58
-
-
Save dubrod/5d6933619e1b40eae15d1b4e3d7b4a38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Group 1 = Category | Combo Box | |
Group 2 = Keywords | Tag field | |
Category Template | |
Snippet = [[cateName]] | |
<?php | |
$get = modX::sanitize($_GET, $modx->sanitizePatterns); | |
$tag = ucfirst(urldecode($get['categories'])); | |
$tag = str_replace("-"," ", $tag); | |
$modx->setPlaceholder('cateName', $tag); | |
Title: [[+cateName]] | |
Content: | |
[[!getPage? | |
&element=`getResources` | |
&parents=`2` | |
&limit=`10` | |
&depth=`0` | |
&where=`[[!TaggerGetResourcesWhere]]` | |
&tpl=`blog-list-row` | |
]] | |
<h3>Article Tags</h3> | |
<ul>[[TaggerGetTags? &resources=`[[*id]]` &groups=`2` &rowTpl=`tag_keywords_tpl` &target=`2`]]</ul> | |
-- | |
<li><a href="[[+uri]]">[[+tag]]</a></li> | |
-- | |
<h3>Categories:</h3> | |
[[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}`]]`]] | |
[[!getResources? | |
&parents=`-1` | |
&resources=`[[+model.id]]` | |
&where=`[[!TaggerGetResourcesWhere? &tags=`sun,women` &matchAll=`1`]]` | |
&tpl=`shop_sun_women_tpl` | |
]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment