Tags for attachments

Hello everyone!
I need new functionality. I need the ability to add tags to files (attachments). Something like this [https://extensions.xwiki.org/xwiki/bin/view/Extension/Tag%20Application], but for files. How can I implement this? (I’m a complete newbie)

Hi, you’ll need to decide 2 things:

  • Where to store the tags
  • Where to display them in the UI

For storing, you can save them in XObjects by introducing a new XClass for them.

For the display, the best place would be in a new column in the LD for attachments in the page. Unfortunately, the LD doesn’t provide extension points to add a new column AFAIK, so you’ll need to customize the skin and override the template holding the LD definition to add your column.

Hope it helps

You could also create a jira issue for this at XWiki Platform - XWiki.org JIRA

Then either implement it yourself or find someone to do it for you (or wait for the need to be more common and more people vote for your issue, until someone decides to implement it). Of course you can also sponsor it, see https://dev.xwiki.org/xwiki/bin/view/Community/Contributing#HSponsoraFeatureorBug

Thx

Thanks for the answer! And what will I have to do for tags to participate in the solr search?

You mean to return the tags for attachment in the search suggest: https://extensions.xwiki.org/xwiki/bin/view/Extension/Search%20Application#HSearchSuggest ?

If so, that’s quite easy, see https://extensions.xwiki.org/xwiki/bin/view/Extension/Search%20Application#HSearchSuggestAdministration

It seems so. Thanks again!