This extension for your Zendesk Guide allows you to display recently updated, most commented, most voted posts, and posts with certain statuses (Planned, Completed, etc.)
-
Unpack the downloaded
zip
file. There will be three files:hotposts-min.css
hotposts-min.js
Readme.txt
-
In Guide, click on the Customize design icon in the sidebar. The Theming center page opens.
-
Click the theme you want to edit to open it.
-
Click the Edit code button.
-
In the Assets section, click Add asset, then browse to select your files.
Select the
*.js
, and*.css
files from the unpacked zip. The files are added to your list of asset files. -
In your theme code configuration page under the templates directory, click the
document_head.hbs
file. - In the
document_head.hbs
file, paste the following snippet:<link rel="stylesheet" href="{{asset 'hotposts-min.css'}}" />
-
In your theme code configuration page under the templates directory, click the
footer.hbs
file. - In the
footer.hbs
file, paste the following snippet:<script src="{{asset 'hotposts-min.js'}}"></script>
- Add the following snippet in the place where you want to display the extension:
<div class="tabs hotposts-tabs"> <div class="tabs-menu"> <span class="tabs-link is-active">Recent Activity</span> <span class="tabs-link">Most voted </span> <span class="tabs-link">Most commented</span> </div> <div class="tab" data-hotposts="{limit: 6, showVotes: false, showComments: false}"></div> <div class="tab is-hidden" data-hotposts="{limit: 6, sort: 'votes', showComments: false}"></div> <div class="tab is-hidden" data-hotposts="{limit: 6, sort: 'comments', showVotes: false}"></div> </div>
-
Click Publish. The Community Hot Posts extension is displayed in the desired place.
Name | Type | Default | Description |
---|---|---|---|
cash |
boolean |
true |
Use local storage to cache requests. |
cashTimeout |
number |
1 |
Cache time in minutes |
status |
string |
all |
Filter posts by status: all , none , planned , not_planned , completed , answered
|
sort |
string |
created_at |
Sort posts by: created_at edited_at , recent_activity , votes , comments
|
limit |
number |
10 |
Number of posts to display |