Kentico CMS 7.0 Developer's Guide

Tagging documents

Tagging documents

Previous topic Next topic Mail us feedback on this topic!  

Tagging documents

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

If you need to learn how to tag a document, the following examples describe this process. There are two ways of tagging documents:

 

You can add tags to individual documents by using the Properties tab of the CMS Desk -> Content -> Edit interface (as described here).

Or you can use the Fields tab in Site Manager -> Development -> Document types -> Edit (Edit) <document_type> (as described here).

 

Tagging documents using Properties

 

1. Go to CMS Desk, switch to the Edit mode and select the document that you wish to tag from the content tree.

 

2. Switch to its Properties -> Metadata tab.

 

devguide_clip0713

 

3. Choose a tag group using the Page tag group drop-down list. If you check the Inherit check-box, tag group will be inherited from the document's parent.

 

 

 

Please note

 

There needs to be at least one tag group defined for you to be able to tag a document. If there are no tag groups created, you will not be able to tag a document as each tag needs to belong to some tag group. You can learn about creating tag groups in the next chapter.

 

It is also recommended to select a tag group for the root of the content tree so that it could be inherited by the pages located under it.

 

4. Enter the tags into the Page tags field. Tags can be entered either manually or can be selected using the Select button. This button displays a list of all tags in the selected tag group. Check the appropriate tags' check-boxes and click OK.

 

devguide_clip0717

 

5. Click Save Save. The entered tags will be saved and attached to the document.

 

 

 

Tag formats

 

When entering more than one tag into the Page tags field, the tags should be separated with a comma or a blank space. A combination of both in a single entry is also valid. The following examples are all valid entries for adding three tags - tag1, tag2 and tag3:

 

tag1, tag2, tag3

tag1 tag2 tag3

tag1, tag2 tag3

 

In case that you are entering a tag consisting of more than one word, you should enclose it within quotation marks. Multiple long tags can also be entered and can be also divided by both blank spaces and commas:

 

"long tag1", tag, "long tag2"

"long tag1" tag "long tag2"

 

Quotation marks can also be used for tags containing special characters that couldn't be used otherwise:

 

"tag@1", "tag#2", "long, strange: tag@#$"

 

The page tags field has also an insinuation function implemented. This functions offers you tags from the selected tag group while you are writing:

 

devguide_clip0944

 

Tagging documents using Fields

 

1. Go to Site Manager -> Development -> Document types and choose to Edit (Edit) a document type.

 

devguide_clip1333

 

2. Switch to the Fields tab, click the New system attribute (AddNewSystemAttribute) icon to create a new system attribute and select the following values from the corresponding drop-down lists:

 

Group: Document attributes

Column name: DocumentTags

Form control: Tag selector

 

devguide_clip1334

 

Click Save Save to confirm the changes.

 

 

 

Please note

 

If you need to create a custom document type with a tag selector, the tag selector must be bound to a system field.