Using Confluence labels

To categorize, identify, or bookmark content in Confluence we can use labels. Labels are keywords or tags that can be added to pages, blog posts, attachments, and spaces as metadata. Labels are user-defined so any word that identifies your content can be used.

For example, you can assign the label "requirement" to all pages with project requirements. It is then possible to browse, or list, all pages with that label in a single space or even across Confluence. It is also possible to search content based on that label.

The advantages of using labels are as follows:

  • Labels are user-defined, so you can decide what information is relevant and how you want to label them, using words you and your users understand
  • With labels you can group pages and spaces without having to restructure your site
  • You can add as many labels as you like
  • Labels are easily added without affecting the content to which you assign a label

Confluence doesn't support multiword labels. Which means that, to label a page with "needs review", the space has to be replaced with another character such as a dash or underscore.

Content labels

Any user with the permission to edit a page or blog post can also manage labels.

In order to add a label, you will have to perform the following steps:

  1. Go to the page you want to label. At the bottom of the page, just below the content, there will be a list with labels (provided the page already has labels, otherwise, No labels will be displayed).
  2. Click on the edit icon next to the list, or press L on your keyboard. This will display the labels dialog.
  3. Type in a new label. Labels that are frequently used throughout your Confluence instance are suggested as you type.
  4. Click on Add as shown in the following screenshot:
    Content labels

In order to remove a label, you will have to perform the following steps:

  1. Open the label dialog (as described in the preceding steps for adding a label).
  2. Next to each label there will be an X mark.
  3. Click on the X mark to remove a label from a page.

Attachment labels

Attachments can also have labels, making it easier to find or filter them. Labels can be added or removed by any user who is allowed to edit the page that holds the attachment.

To add a label to an attachment, perform the following steps:

  1. Go to the page that contains the attachment.
  2. Choose Tools | Attachments to go to the attachment view.
  3. On the attachment view you will see a list of attachments. If an attachment already has labels, these will be shown in the Labels column.
  4. Click the edit icon to open the label dialog.
  5. Type a new label; existing labels will be suggested as you type.
  6. Click on Add as shown in the following screenshot:
    Attachment labels

Labels are deleted the same way as with pages. Click on the X mark next to a label to remove it from the attachment.

Using space categories

A space category is a special label that Confluence uses to group spaces in the space directory and in the recent activity area on the Dashboard. Let's assume that you have one or more spaces that contain information about the same project, Project42. We can categorize all those spaces as "Project42" to group them.

Grouping spaces with categories will reflect in the space browser and you can see the updated content in those spaces by choosing the Project42 category under the Space Categories tab on your dashboard as shown in the following screenshot:

Note

You have to be space administrator or a Confluence (system) administrator to set up the space category for a space.

Using space categories

To add a category to a space, perform the following steps:

  1. Go to the space and choose Space tools on the left sidebar.
  2. Select Overview to navigate to the space details page.
  3. Click on Edit, next to Space Categories.
  4. Use the text field to add new categories to a space.
  5. Click on Done.

Categories are removed the same way as labels. Click on the X mark next to the category to remove it.

Note

To completely remove a category or label, just remove the label everywhere it is being used. A category or label cannot exist if it isn't being used.

Viewing labels

When you click on a label on a page, blog post, or attachment, you will be forwarded to the labels view. Alternatively, if you are using the documentation theme, go to any page in a space and choose Browse | Labels.

The labels view in a space offers the following features:

  • Popular Labels: Use this view to see a list of the most frequently used labels in that space. From this view you can also view the global popular labels. The bigger the label, the more popular it is.
  • All Labels: This view will show all the labels in the space. Click on a label to see the associated content in that space. It will also display related labels if they exist. Related labels are labels that often appear on pages together.
  • See content from all spaces: From both views it is easy to expand the list to include all labels content across your Confluence site.
    Viewing labels

Using labels to display content

Labels are very powerful when used in conjunction with macros to dynamically display content. Confluence comes with the following set of macros for labels:

  • Content by Label: This lists pages tagged with one or more specific labels
  • Labels List: This lists all labels of a space, grouped alphabetically
  • Navigation Map: This creates a map of pages associated with a specified label
  • Popular Labels: This generates a list or heat map of the most popular labels
  • Recently Used Labels: This lists the most recently used labels in a predefined scope of spaces
  • Related Labels: This lists labels used on other pages that have labels in common with the current page.

We will discuss the Content by Label macro as this is probably the most used macro of the set.

The Content by Label macro

The Content by Label macro will find and display a list of all pages, blog posts, and attachments in a space tagged with the specified labels. Imagine yourself with a space full of projects and customer information; with this macro you can easily create an overview of all customers provided you labeled them.

Tip

Using labels for reviews

We often use labels to indicate whether a page needs to be reviewed or is outdated. With the Content by Label macro we created an overview page showing those pages. When a page is reviewed, the label is removed and, therefore, doesn't show on the overview.

To add the Content by Label macro to a page, perform the following steps:

  1. Open a page in the edit mode and place the cursor at the location where you want to add the macro.
  2. Choose Insert | Other Macros.
  3. Find and select the Content by Label macro.
  4. Fill in the properties on the right-hand side of the screen; the label is required.
  5. Click on Insert as shown in the following screenshot:
    The Content by Label macro

The following properties are available for the Content By Label macro:

Properties

Default

Description

Label(s)

 

The macro will only display content tagged with the labels specified here. You can specify multiple labels separated by a comma.

Labels can be excluded by putting a minus (-) directly in front of the label. If you, for example, specify -lorum, you only get content that is not labeled with lorum.

Author(s)

 

This will filter by creator or last updated by.

Include this Content Type Only

All

Set the content type to display. The default will show page, blogpost, and attachments but you can specify one or more content types.

Show Labels for Each Page

Yes

This shows or hides the labels in the results.

Show Space Name for Each Page

Yes

This shows or hides the spaces in the results.

List Title

 

Here you can add a heading to the list.

Maximum Pages

15

This limits the maximum number of results to display. Note that the results are sorted first then limited.

Display Excerpts

No

Display the page excerpt (added by the excerpt macro).

Restrict to Spaces

@all

The macro will only display content in the specified spaces. You can specify multiple spaces separated by a comma. To exclude a space add a minus (-) in front of the space key.

The special values include:

  • @self: The current space
  • @personal: All personal spaces
  • @global: All global spaces
  • @favorite: The spaces you have marked as favorite
  • @all: All spaces in your Confluence site

Operator

OR

This is the operator to apply when matching content against the specified labels:

  • OR: Displays content with any of the labels
  • AND: Displays content will all of the labels

Labels prefix with a minus are not affected by this setting.

Sort By

Modified

This specifies how the results should be sorted.

Reverse Sort

no

Select Reverse Sort to change the sort from descending to ascending order. Use this parameter in conjunction with the Sort By parameter. Reverse Sort is ignored if Sort By is not specified.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.117.214