I'm searching a way to get resource list with Tagger (
http://rtfm.modx.com/extras/revo/tagger) extra + modx 2.3
I have a problem with TaggerGetResourcesWhere snippet : it doesn't return anything :
[[!getResources? &where=`[[!TaggerGetResourcesWhere? &tags=`webdesign`]]` &tpl=`wtpl.gres.row`]]
Any feedback with modx 2.3 ?
GetResources : 2.3
Tagger : 1.5
[ed. note: johnxx last edited this post 10 years, 6 months ago.]
MODX lover
-
Développeur MODX / Webdesign / Solutions web
Sorry, I have no solutions for the moment. I'll post here asap if I find it.
MODX lover
-
Développeur MODX / Webdesign / Solutions web
Just a thought, I was struggling with this for several hours before I discovered that I had copied-and-pasted from several places and I had some <span> and <pre> statements buried in the code, got rid of them and it works fine now using modx 2.3 and tagger 1.5
Hi,
try to run only [[!TaggerGetResourcesWhere? &tags=`webdesign`]] without getResources and check what you get. If there will be section "WHERE r.tag IN (0)" there is not tag with alias "webdesign".
Let me know if that's not the case of your problem.
--
John
@theboxer
Hi,
It turned out that my problem was that I wanted to search with the name of the tag and not the alias, but I was using the wrong column name
&tagField=`tag` is what I needed to use.
Thanks very much for your help.
Another test with another modx installation :
[[!getResources?
&tpl=`results-doc-row`
&depth=`0`
&showUnpublished=`1`
&showHidden=`1`
&limit=`100`
&includeTVs=`1`
&processTVs=`1`
&includeContent=`1`
&where=`[[!TaggerGetResourcesWhere? &tags=`trace` &groups=`1` &where=`{"isfolder": 0}`]]`
`]]
> nothing
[[!TaggerGetResourcesWhere? &tags=`trace` &groups=`1` &where=`{"isfolder": 0}`]]
> {"isfolder":0,"0":"EXISTS (SELECT 1 FROM `modx_tagger_tag_resources` r WHERE r.tag IN (1) AND r.resource = modResource.id)"}
Tagged resources are in Collection (extra)
MODX lover
-
Développeur MODX / Webdesign / Solutions web
[[!getResources?
&parents=`17`
&tpl=`results-doc-row`
&showUnpublished=`1`
&showHidden=`1`
&limit=`100`
&includeTVs=`1`
&processTVs=`1`
&includeContent=`1`
&where=`[[!TaggerGetResourcesWhere]]`
]]
> works fine (&parents added)
> ok for [[~[[*id]]]]/tag/trace to show child resources of 17 tagged with "trace"
MODX lover
-
Développeur MODX / Webdesign / Solutions web