# Add category links Theme Component

**URL:** <https://meta.discourse.org/t/add-category-links-theme-component/152735>\
**Category:** Theme component\
**Created:** [May 26, 2020, 6:35am UTC](https://meta.discourse.org/t/add-category-links-theme-component/152735 "2020-05-26T06:35:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sbernhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sbernhard/32/208186_2.png) [@sbernhard](https://meta.discourse.org/u/sbernhard)\
**Post date:** [May 26, 2020, 6:35am UTC](https://meta.discourse.org/t/add-category-links-theme-component/152735/1 "2020-05-26T06:35:04Z")

</div>

This component scans the **full** description of a category for given tags and display the additional links to categories. See screenshot.

### Screenshot

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/a/6a11a53fc71d2e087fd632cc4ce891bfa40381df.png)

### Repo

[https://github.com/sbernhard/discourse-add-category-links](https://github.com/sbernhard/discourse-add-category-links)

### About

#### Why should I use it and why is it implemented like this?

You want to display additional links to e.g. other resources of this type of category. Think about a category for a soccer club and you want to add the link to the website of the club. In such cases, you can use a [GitHub - naidihr/discourse-category-headers: Theme component providing custom settings for the discourse category header · GitHub](https://github.com/naidihr/discourse-category-headers.git)

If you have more than one link, and/or you don’t want that link to appear in the categories overview site, and/or you don’t want that huge banner, you can use this theme.

It’s implemented like this to parse the **full** description of a category because discourse only uses the first fragment of the “first topic post” to create the category description which is dislayed in the categories overview site. The rest of the post isn’t shown.

In case you are using a lot of categories, maybe created using a API, this additon is fully usable as the category first post (= the full description) can be set via API, too.

### Installation

[How do I install a Theme or Theme Component?](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)

### Configure it

Configure the theme component and set the tags, like

```plaintext
WIKI, blank

```

Change the description of a category so that it looks like this

```plaintext
This is the displayed category description.

`
{AddCategoryLinks}
{WIKI#Wiki#Our awesome wiki#https://awesome-wiki-which-doesnt.exist}
{TAGNAME#Link Name#Link Title#Link URL}
`

```

Please note

- Its important that `{AddCategoryLinks}` exists in the description.
- `Its important that its within a code block (within `…`).`
- Use # as a separator.

**Note:** I would recommend to hide the post in which the description of a category is written down so that users don’t see the `AddCategoryLinks` etc. additions.

### Thanks

- discourse, a great tool
- [GitHub - discourse/discourse-custom-header-links · GitHub](https://github.com/discourse/discourse-custom-header-links.git)
- [https://github.com/discourse/discourse-category-headers.git](https://github.com/discourse/discourse-category-headers.git)

---

_[View the full topic](https://meta.discourse.org/t/add-category-links-theme-component/152735)._
