mgGetTags need help with resource

I am having an issue with mgGetTags resource that I am hoping someone can help with. In my mgGetImages i am using &resource=354,355,356,357,358 and grabbing the images from multiple galleries. It works well. I am trying to list the tags so the user can select images by their tags. I am using [[!mgGetTags]] and it seems to work well too. My issue is that we have multiple contexts and I would like to use only the tags in the galleries we are using. As soon as I add the &resource to mgGetTags all my tags disappear. It doesn’t matter if I use:
[[!mgGetTags &resource=0]]
[[!mgGetTags &resource=0]]
[[!mgGetTags &resource=354,355,356,357,358]]

The only way I can get tags to show is with [[!mgGetTags]] and no resource specified.

Any ideas what I am doing wrong?
Thanks

Hi Steve!

The mgGetTags snippet does not currently support listing tags from multiple resources. I’ve created a feature request in our tracker for this (#203) and will report back when we add that.

In the meantime, perhaps you can use multiple mgGetTags snippets, separated by a comma? I’m not sure if mgGetImages will error out on duplicate tags being requested, but if so, that would be a much easier and quicker thing for us to fix for you than the multi-resource support. Edit: sorry, misread, this is not a solution for the problem you asked.

I would try the multiple mgGetTags snippets but I can’t get &resource to work at all. The only way mgGetTags works is accross all contexts and I cannot specify even one resource.

I must be doing something wrong

Something like

[[!mgGetTags &resource=`345`]]

doesn’t show any tags used on resource 345 at all?

If I use [[!mgGetTags &resource=354]] there are no tags listed even though images in that gallery have tags assigned to them

[[!mgGetTags &resource=354]]

the marks around 354 are being stripped when I post here but exist on my document

Fixed it! missing the ?
[[!mgGetTags? &resource=354]]

1 Like