Tagger : Tagger, group output tags from different groups

Hi,

here is a how to create mixed output tags from tagged resources.

it uses migxCollection, and solution was provided by @bruno17

     [[migxLoopCollection?
&classname=`modResource`
&selectfields=`id,pagetitle`
&placeholdersKeyField=``
&joins=`[
{"classname":"TaggerTagResource","alias":"tri","on":"tri.resource=modResource.id","type":"right"},
{"classname":"TaggerTag","alias":"ti","on":"ti.id=tri.tag and ti.group=2","type":"right"},
{"classname":"TaggerTagResource","alias":"trc","on":"trc.resource=modResource.id","type":"right"},
{"classname":"TaggerTag","alias":"tc","on":"tc.id=trc.tag and tc.group=3","type":"right"}
]`
&where=`{"parent":"317"}`
&tpl=`@CODE:<option value="[[+pagetitle]]" data-chained="[[+ti_alias]]+[[+tc_alias]]"> [[+pagetitle]]</option>`
&debug=`1`
]]

this was used inside a select field, depending on values from 2 others select lists.
i used this js script to chain values : https://appelsiini.net/projects/chained/

so the tags are created like this : data-chained=“tag1-group1+tag1-group2, tag2-group1+tag2-group2” and so on.

hope this can help someone else, and thanks again to bruno !

2 Likes