Document Library - tags

Permalink Browser Info Environment
How can multiple tags be added to document library so that library will pull files with various tags?

Type: Discussion
Status: Archived
scsadmin
View Replies:
mkly replied on at Permalink Reply
mkly
Hello,
Right now Document Library only sorts by a single tag.

Here's aq quick change that may(haven't tested) let you include multiple tags.

Around Line#362 of /packages/document_library/blocks/document_library/controller.php
change
//filter by tag - right now it only filters by one
if(strlen(trim($this->tags))) {  
  //$fileList->filter(false, "( fv.fvTags like ".$db->qstr("%\n".$this->tags."\n%")."  )");
  $fileList->filterByTag($this->tags);
}

to
if(strlen(trim($this->tags))) {
  $qstrs = array();
  foreach (implode(',', trim($this->tags)) as $tag) {
    $qstrs[] = 'fv.fvTags LIKE '.$db->qstr("%\n".trim($tag)."%\n");
  }
  $fileList->filter(false, '( '.explode(' OR ', $qstrs).' )');
}


You should be able to pass in a comma seperated list of tags to include from. Again, haven't tested this but it might get you started.

Best Wishes,
Mike
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.