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.
66 comments
Vinicius Jose da Rocha
É uma opção complexa para algo simples. O Intercom oferece essa opção de maneira simples: crie o artigo e não associe ele a nenhuma seção (coleção), pronto! Você terá um link que pode ser visualizado apenas por quem o tiver.
0
Marina Kutt
Hi Ifra! Thanks for your reply. I don't think using segments will be the solution, as our users don't need to log in to see our HCs :)
0
Ifra Saqlain
Hi Marina Kutt,
Can I get URL of both HC to fix this issue. I think you need to use segments for your HCs.
Thank You
Ifra
1
Marina Kutt
Hello! This is my dilemma. We have a help center that's general and has got different categories and sections (and articles, of course). Those appear in all our “product-based” help centers. On the other hand, each of those “product-based” help centers have got their categories and sections (and articles, of course).
Now some of our articles only apply to some products. In-app (through the SDK), we are able to hide some articles from different products with labels. Is there a way to do that for the web-Help Center?
Thanks!
0
Ifra Saqlain
Hi Abdelhameed,
When you have copied and pasted all your form's URLs then you need to hide the dropdown selector by using this code.
I have copied my form URL and pasted it as a link on the article page
and now I don't want to leave a choice that anyone can select another form so I used this code to hide the dropdown selector.
Now I have only the Subject field and Description field.
If any confusion let me know.
Thanks
0
Ifra Saqlain
@Abdelhameed, I'll get back to you soon with your answer.
Thanks
0
Abdelhameed Khaled
Hi 1263169183150 thanks
Ok there is an issue . when I paste the URL in an article for example it still offer the drop down menu . what I want is to only show the specific form which I provided the link for so that customer or viewer cannot choose another one how to do this . is it possible from the code?
0
Ifra Saqlain
Hi Abdelhameed Khaled,
Open your submit a request page and select the first form from the dropdown.
You will get the URL of that form in the searchbar, copy that, and use it wherever you want.
Again select the second form from the dropdown copy URL and use that.
If any issues feel free to ask :)
Thanks
0
Abdelhameed Khaled
If I have multiple forms how to get the URL of each one of them . I want to include each of them in different articles of categories because I will hide submit a request
0
Paolo Votta
Hello and thank you for your help! The thing is that I need the community to be activated but only visible to internal agents in this moment. Later on I will try to extend it for a specific user segment. It would be a great improvement if you can restrict the visibility of the community by user segment, and NOT only posts visibility, but the entire community. For the moment I will remove the community button from the code as it was suggested.
Thank you for taking the time to reply to my question!
0
Sign in to leave a comment.