# Advanced Header Search

**URL:** https://meta.discourse.org/t/advanced-header-search/194093
**Category:** Theme component
**Tags:** official, header-search
**Created:** [June 16, 2021, 6:03pm UTC](https://meta.discourse.org/t/advanced-header-search/194093 "2021-06-16T18:03:28Z")
**Posts on this page:** 1
**Showing post:** 70

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [December 3, 2024, 9:00am UTC](https://meta.discourse.org/t/advanced-header-search/194093/70 "2024-12-03T09:00:02Z")

</div>

> [@Stephane\_Roy](#):
>
> I’m having trouble understanding how to use the parameters.
> 
> Would it be possible to have an example?

Hey @Stephane_Roy,

Sorry I didn’t see this earlier. From memory, Penar did most of the work on this, but I wrote the spec so can answer most of your questions about this functionality. Feel free to nudge me here if you have more questions 🙂

Below is an example of what I did inside our Gitlab Category. You can see in our header search bar that as soon as we type a search term(in this case pipeline) you can search the gitlab forum(clicking comments button), the gitlab docs(book), the gitlab project(ticket), and gitlab python libraries.

![image](https://global.discourse-cdn.com/meta/original/4X/c/6/9/c69ac2c2fa524ec16ebc28a32fe27144645fc21e.png)

Below is an example of the params which lets you search the gitlab forum.

| params | value |
| --- | --- |
| prefix | [https://forum.gitlab.com/](https://forum.gitlab.com/) |
| icon | comments |
| target | \_blank |
| showInCategories | 20,33,90 |

 ![The image shows a configuration interface for a GitLab forum, with fields for prefix, icon, target, and showInCategories. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/f/c/4/fc4052e7b9bed5239b498d62ecf3ba119a369f8f.png)

The Params, as far as I remember are

| params | value |
| --- | --- |
| prefix | domain url with forward slash |
| icon | name of the svg icon. You can use fontawesome icons, or custom icons |
| target | |
| showInCategories | list of category IDs which the icon should appear in |
| excludeFromCategories | Show the icon in every category _except_ this list of categories |

⚠ use only one of either showInCategories or excludeFromCategories

Below is one of the related commits are from March to April 2023 give or take. The test case is a pretty good example too:  
[DEV: Add test case by pmusaraj · Pull Request #23 · discourse/discourse-header-search · GitHub](https://github.com/discourse/discourse-header-search/pull/23/commits/c74c9d3858a04351c797bbeaa6418367db7b34ef)

---

_[View the full topic](https://meta.discourse.org/t/advanced-header-search/194093)._
