Zendesk
Step-by-step guide for integrating Glean search functionality into Zendesk Guide using the Copenhagen template
Overview
Glean offers two distinct options for implementing search functionality within Zendesk Guide:
Modal Search
A modal search interface that overlays the current page when activated
Autocomplete & Results Page
An integrated search experience with autocomplete and a dedicated results page
These implementation instructions are based on the Copenhagen Zendesk Template. While they should work with other themes with minimal modifications, some adjustments may be needed depending on your specific theme.
Modal Search Implementation
Access Theme Customization
Navigate to the Customize design section by clicking the “eye” icon in the left navigation
Select Theme
Locate the Live theme section and click Customize on your theme
For live help centers, we recommend creating a copy of your theme for testing:
- Find your live theme
- Click the three vertical dots menu
- Select Copy
Edit Theme Code
- Click Edit Code to access the theme code editor
- Open script.js from the left panel
- Add the following code at the top level:
- Click Save
Preview and Publish
- Click Preview in the left panel to verify your changes
- Once confirmed, apply the changes to your live theme
- Click Publish to make the changes live
Autocomplete and Search Results Implementation
Import JavaScript Files
- Access theme customization as described above
- Click Edit Code
- Open document_header.hbs
- Add the following script tag:
Replace Search UI Components
Home Page Search
- Open home_page.hbs
- Replace the existing
{{search}}
component with:
Search Results Page
- Open search_results.hbs
- Replace all existing code with:
Add Compact Search Box
- Open article_page.hbs
- Replace the existing search code with:
Initialize Glean Search
- Open script.js
- Add the following code at the end of the file:
Verify and Publish
- Click Preview to test your changes
- Apply the changes to your live theme
- Click Publish to make the changes live
Was this page helpful?