# Add category links Theme Component

**URL:** https://meta.discourse.org/t/add-category-links-theme-component/152735
**Category:** Theme component
**Created:** [26 mei 2020 om 06:35 UTC](https://meta.discourse.org/t/add-category-links-theme-component/152735 "2020-05-26T06:35:04Z")
**Posts on this page:** 2
**Page:** 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: [26 mei 2020 om 06:35 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)

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [22 april 2025 om 13:14 UTC](https://meta.discourse.org/t/add-category-links-theme-component/152735/2 "2025-04-22T13:14:45Z")

</div>

I’ve just come across this component now as I’m trying to do the same basic thing.

Surprisingly, it still almost works!

 ![The image shows an empty Discourse category titled "Admins Workspace" with no conversation topics and a prompt for users to start a new conversation. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/c/f/a/cfabb099f54acc69fe491482f003a91d95de9abf.png)

The links are present, but the category description is not unfortunately.

I’ve had a go with my AI coding friend to try to resurrect this, but as usual he is a bit useless.

Anyone else interested?
