Skip to content

Instantly share code, notes, and snippets.

@moderatorwes
Created November 9, 2016 16:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moderatorwes/91116a07973a53ae5b5ccefae4f555b0 to your computer and use it in GitHub Desktop.
Save moderatorwes/91116a07973a53ae5b5ccefae4f555b0 to your computer and use it in GitHub Desktop.
Zendesk: Redirect Category Links using {{curlybars}}
<!-- Grab the id of the category and insert into the is statement. This code is from the Copenhagen Theme-->
<li class="blocks-item">
{{#is id 204259447}}
<a href="/hc/communities/public/topics" class="blocks-item-link">
<h4 class="blocks-item-title">{{name}}</h4>
<p class="blocks-item-description">{{excerpt description}}</p>
</a>
{{else}}
<a href='{{url}}' class="blocks-item-link">
<h4 class="blocks-item-title">{{name}}</h4>
<p class="blocks-item-description">{{excerpt description}}</p>
</a>
{{/is}}
</li>
@Swede71
Copy link

Swede71 commented Jan 11, 2018

Hi @nerlandson. Where in the HTML did you place the above?

@UnluckyThirteen
Copy link

@moderatorwes how would you adjust this to point a section or article to a specific URL? And where would it go?

@amandab03
Copy link

I know this is old, but wondering where this code should be placed in my help center. @moderatorwes or @Swede71 ?

@LucaPist
Copy link

I know this is old, but wondering where this code should be placed in my help center. @moderatorwes or @Swede71 ?

up

@moderatorwes
Copy link
Author

moderatorwes commented Aug 5, 2023

@LucaPist - You will need to put this in the Category.hbs if you have access to that. I haven't been in Zendesk Guide for a while so not even sure if this code is valid but it appears I wrote it with the new template styles so it should still be valid. If that doesn't work then it goes to the homepage.hbs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment