---
title: Displaying tags on a page
related:
  - https://docs.kentico.com/k11/managing-website-content/configuring-the-environment-for-content-editors/configuring-tags/creating-tag-groups.md
  - https://docs.kentico.com/k11/managing-website-content/configuring-the-environment-for-content-editors/configuring-tags/allowing-users-to-tag-pages-on-the-form-tab.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Tag clouds display tags associated with specific pages. These tags are displayed in the form of links and those with higher occurrence are displayed in higher font size. When a site visitor clicks on one of the links, the system displays a list of all pages with the given tag. To add a tag cloud to a page, use the **Tag cloud web part**.

![Tag cloud displayed on a page](https://docs.kentico.com/docsassets/k11/displaying-tags-on-a-page/tag_cloud_displayed_on_page.png "Tag cloud displayed on a page")

## Common use

The Tag cloud "works in pair" with a repeater web part. When a user clicks on a tag in the tag cloud, the repeater web part displays a list pages with the clicked tag. You can place the repeater either on the same page as the tag cloud or on a different page to which the site visitor is then redirected.

> **Tip:** You can see an example of this setup on the sample Corporate Site site under **Examples -> Web parts -> Tagging & Categories -> Tag cloud**.

## Pairing the Tag cloud and Repeater web parts

In order for the two web parts to cooperate, you have to correctly set some of their properties.

**Tag cloud:**

- The placement of the repeater is defined by the Tag cloud's **Page list URL** property. In case that the repeater is placed on the same page as the tag cloud, the value should be left blank. In case that it is placed on some other page, enter the **alias path** of that page.
- ID of the clicked tag is transferred to the repeater in the form of a query string parameter. You can set the name of the parameter in the **Query string parameter name** property. The repeater then displays a list of pages based on the value it gets via this parameter.

**Repeater**:

- Set the value of the **Path** parameter to the location in the content tree where the pages that you want to display are stored.
- Set the value of the **Page types** parameter to the page types that you want displayed by the repeater.
- Select the transformations that you want to use for the **Transformation** and **Selected items transformation**.
- Finally, use the following code as a value for the repeater's **WHERE condition** parameter. The **tagid** value should be replaced by the name set in the Tag cloud's **Query string parameter name**:

```sql

('{?ToInt(tagid, "")?}' = 0 AND '{?tagname?}'='') OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID = {? ToInt(tagid) ?}))

```

This condition ensures displaying of pages based on the received **tagid** (or differently named parameter) from the **Tag cloud** web part.
