
Tagging a document
A tag is a non-hierarchical keyword associated with a content or document. Tag is part of the metadata set of a document. A tag helps describe content, and enables keyword-based classification and easy search of information.
In a content management system, it is important to tag content or a document so that finding the actual content becomes easy and accurate.
How to do it...
- Open a particular space into which the document resides that you want to attach tags to.
- Here, we will use the same
About InfoAxon.html
content we used in previous recipe. Click on View Details and open the details page of the content. - Alfresco offers the taggable aspect. Associating this will introduce the capability of attaching tags to a document. By default, this aspect is not associated with the uploaded or created documents, and thus tagging is not enabled for a document uploaded in Alfresco. Hence, we need to associate this aspect first in order to attach tags with this document.
- Click on the Run Action link. In the Select Action list, click on Add an aspect.
- Then click on Set Values and Add beneath the list. A list of the available aspects is displayed. Select the taggable aspect in the list and click OK.
- Click on Finish to complete the operation.
- The content details screen re-appears. See the Properties section in the screen; you will notice that a new property named tags has been added to this content. Now click on the Modify link to edit the properties.
- The property editor screen opens up allowing you to edit the metadata. Click on Click to select tags to open the tags editor panel.
- The tags panel appears. Click on the Add a tag link and enter your new tag in the textbox provided. Click on the green tick mark to add the tag.
- In this way, keep on adding the tags you want. After adding the tags, you need to click on OK to save your work. If you click Cancel, the tags will be added in the repository space scope, but won't be associated with your content. In that case, you will have to re-open this dialog box and click on the green plus mark of the corresponding tag.
- Here, we have created two new tags—infoaxon and cookbook, but only associated tag infoaxon with this content.
- Invoking the tag editor again will show this—infoaxon is a tag of this content but cookbook is not.
There's more...
One interesting point to be noted here is that Alfresco works with tag scope concept. Every folder or space in Alfresco can be a tag scope. This means if a space is defined as a tag scope, the tags created in the particular space is limited to that space only.
That's why, in our example in this recipe, we have created two tags—infoaxon and cookbook. So these two tags are in the scope of the current space. We have two documents in this space—About InfoAxon.html and logo.gif
. If you open the tag editor for logo.gif
file, you can see these tags ready to be attached with the document.
