New Community Forums are coming. Watch this space for news.
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.

    Regards
    Alexander
    • Ok found a sulotion by myself.

      I changed the snippet code from

          $c->where(array(
              'Tags.tag' => $tag,
          ));


      to

          $array_tags=explode(',',$tag);
          foreach($array_tags as &$value){
              $value = trim($value);
          }
          $c->where(array(
              'Tags.tag:IN' => $array_tags,
          ));