<ul class="sideLink"> [[TaggerGetTags? &showUnused=`1` &rowTpl=`tag_links_tpl`]] </ul>
<li><a title="[[+tag]]" href="[[+uri]]">[[+tag]]</a></li>
[[!getResources?
&parents=`[[++blog_id]]`
&tpl=`childItemNews`
&depth=`0`
&showHidden=`0`
&limit=`0`
&includeTVs=`1`
&processTVs=`1`
&includeContent=`1`
&sortby=`{"publishedon":"ASC","createdon":"DESC"}`
&where=`[[!TaggerGetResourcesWhere? &where=`{"isfolder": 0}`]]`
]]
if ($tags == '') {
if (isset($_GET[$tagKey])) {
$tags = $_GET[$tagKey];
} else {
return $modx->toJSON($where);
}
}
This question has been answered by multiple community members. See the first response.
$tagKey = $modx->getOption('tagger.tag_key', null, 'tags');
$tags = $modx->getOption('tags', $scriptProperties, '');
$where = $modx->getOption('where', $scriptProperties, '');
$where = $modx->fromJSON($where);
if ($where == false) {
$where = array();
}
if ($tags == '') {
if (isset($_GET[$tagKey])) {
[b]$tags = $_GET[$tagKey];[/b]
} else {
return $modx->toJSON($where);
}
}http://www.mysite.it/myblog/&tags=MYTAG
the problem in # character, if i use # before tag in tag in the URL the $_GET variabile doesn't read the value.I am using the uri placeholder, just wasn't using friendly urls..
Glad you got it sorted.
[[!getResources? &where=`[[!TaggerGetResourcesWhere? &tags=`[[*tags]]` &where=`{"isfolder": 0}`]]`]][[TaggerGetTags? &resources=`[[*id]]` ]]
[[!getResources?
&parents=`[[++blog_id]]`
&tpl=`childItemNews`
&depth=`0`
&showHidden=`0`
&limit=`0`
&includeTVs=`1`
&processTVs=`1`
&includeContent=`1`
&sortby=`{"publishedon":"ASC","createdon":"DESC"}`
&where=`[[!TaggerGetResourcesWhere? [b]&tags=`[[*tags]]`[/b] &where=`{"isfolder": 0}`]]`
]]
[[!getResources?
&parents=`[[++blog_id]]`
&tpl=`childItemNews`
&depth=`0`
&showHidden=`0`
&limit=`0`
&includeTVs=`1`
&processTVs=`1`
&includeContent=`1`
&sortby=`{"publishedon":"ASC","createdon":"DESC"}`
&where=`[[!TaggerGetResourcesWhere? &tags=`[[TaggerGetTags? &seperator=`,` &tpl=`tagTpl`]]` &where=`{"isfolder": 0}` &resources=`[[*id]]`]]`
]]
[[+tag]]