Recent searches
No recent searches
Help Center - Reusable Components?
Posted Nov 26, 2024
Hi, I’m using Zendesk Help Center to build my help center and customizing the UI by editing the theme code. I’m wondering if it’s possible to create reusable files/components with common code (HBS/HTML elements) that can be included and reused in other components.
For example, I’d like to create a card.hbs file containing the code for a card component and reuse this code across multiple templates like home_page.hbs, category_page.hbs, and so on.
In Handlebars, this concept corresponds to partials. However, the Zendesk Help Center doesn’t support the use of the partials helper.
This feature would be extremely useful (or essential) for customizing themes. Themes have size limits in terms of MB, so reusable components would help avoid duplicating code, keeping the theme size smaller, and improving code readability. Without reusable components, code repetition makes maintenance harder, increases the risk of errors, and bloats the theme unnecessarily.
0
2 comments
David Sarnowski
Enrico Monte I recommend you reach out to the Zenplates team (https://www.zenplates.co/patterns). They are doing some really interesting work along these lines that might be helpful for you.
0
Enrico Monte
Hi David,
Thank you so much for your response!
If I understand, I need to purchase a theme from the Zenplates Partner, and their themes provide additional features such as Utils, Patterns (reusable components), and Microtemplates. Unfortunately, we have already purchased a bundle of themes from another Zendesk Partner.
Isn’t there a way to achieve this independently of the theme? Specifically, to define a component with shared code in the assets or templates folder and include it in a Zendesk template page to display that component?
0