On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    I want to make something like user specific gallery views. For that I am thinking about to have a "customers" gallery with alle the pictures in tagged with names.
    To only give a user access to certain pictures I make a user setting with the tag a user can see.
    My call of gallery is then
    [[!Gallery? &album=`customers` &tag=`[[++alowed_tag]]`]]

    This works so far.

    But now I want to give pictures not only one tag but multiple and I want to set a user not with only one tag but with muliple too.

    But the code of the gallery snippet only accepts one tag.

    I dont wanna explode the user setting and then have multiple gallery calls.

    Can someone give me a hint how to tweak the query generation in the gallery snippet to work with a delimiter seperated list of tags?

    Thanks in advance.

    • Ok found a sulotion by myself.

      I changed the snippet code from

              'Tags.tag' => $tag,


          foreach($array_tags as &$value){
              $value = trim($value);
              'Tags.tag:IN' => $array_tags,