Curlybars lets you hide components in your help center, such as the article, section, category, community topic, or community post. To do this, add conditional statements in your theme code that target the unique ID number of the component you want to hide.
This customization is available for the Guide Professional and Enterprise plans, and the Suite Growth plan or higher. The workflow includes the steps below.
Step 1: Find the component's ID number
Each component has a unique ID. The ID number appears in the URL when you navigate to the component's page.
To find the unique ID number
- In your help center, navigate to the component. For example, click a category if you want to hide the category from your help center.
- Find the URL in your browser's address bar and get the unique ID number. The URL has the sample format
/hc/en-us/categories/200420805-General
. In this example, the number200420805
is the unique ID of the component. Take note of this number. - Repeat the steps to get other unique ID numbers if you need to hide multiple components.
Step 2: Edit the theme code
Access your theme code and add the isnt helper expression. When you use the isnt
statement on a component's ID number, your theme won't render the targeted component and hide it from your help center pages.
To access your theme code
- In Guide, click Guide admin.
- Click the Customize design icon () in the sidebar.
- Find your live theme and click Customize. Then, click Edit Code.
- Find the page you want to edit in the templates folder.
To add the isnt statement
In this example, the Copenhagen theme is edited to hide the Announcements and Unlisted categories from the home page. They're still accessible to users with a link to the categories and their articles.
- In the templates folder, click home_page.hbs to access the home page template.
- Add the
isnt
statement with the unique ID number of the component. Repeat the code if you need to target multiple components.
- Click Publish. To check that the components disappeared, click Preview.
What's next
Use the isnt
statement to hide other components from your help center and community pages. Select a template file in your theme and target the component's ID. In this example, an article is removed from the sections list in the sidebar, but is still accessible through search or direct link.
To achieve this, add the isnt
statement with the article ID to the article_page.hbs template file.
For more information, see the article: Customizing your help center theme.