Hyperlinking Help Center Categories

Answered


Posted Jul 10, 2015

Hi all,

We use the Humble Squid theme for our Help Center. Within our Help Center, we currently have it broken out into 6 categories. Four of the categories contain a few sections with articles. We would like to hyperlink the other two categories to our website and also to the request form; we think our customers would benefit from having all the resources in the middle of the screen, rather than keeping the link to the request form in the upper right of the display. 

Is this possible to create the hyperlinks that I described in the Humble Squid without creating section and article content?

Or, is there another theme (i.e. Curious Wind) that allows me to embed a hyperlink on a category?

If I need to get into the HTML, has anyone done something like this before?

Thanks!

Mike


0

34

34 comments

Ahh - perfect! Thanks for your prompt assistance, Vladan! 

0


Yup, the code looks good! You just need to put it in the head template (document head). try it out and let us know how it goes! 

- edit your theme template

- open head template

- paste your code on the top of the head template.

 

0


I haven't placed it anywhere yet because I wasn't sure where! 

This is the article URL: https://help.loseit.com/hc/en-us/articles/360011377794-Feature-Suggestions

This is the code I was thinking:

<script> 
if(window.location.href.indexOf("360011377794") > -1) {
 window.location.replace('https://www.surveymonkey.com/r/LH6KTDC');
}
</script>

 

0


Hi Emma, just to check, where you have placed the code above and did you change to ID from 888888 to your article ID? Any chance you can share your article url with me?

0


Hi Vladan. I'm using the Copenhagen theme and having the same issue as David. When you perform a search, the dummy article shows up and doesn't link to the external link like the category does. 

I tried using this code, but I wasn't sure where to put it. Could you tell me more specifically where this goes? 

<script> 
if(window.location.href.indexOf("888888") > -1) {
 window.location.replace('https://drive.google.com');
}
</script>

0


Thanks, Vladan! 

So glad to hear this worked out for you, David. 

0


This is exactly what I wanted! Thank you!

0


Yes, let's try to improve that. Please put this code (remove current) at the top of the head template (head, not header ;) ).

<script> 
if(window.location.href.indexOf("888888") > -1) {
 window.location.replace('https://drive.google.com');
}
</script>

and replace 888888 with your ID.

 

0


You are awesome! That worked. The dummy article does display temporarily before redirecting to the external link. I'm not quite sure how to prevent that. I will play around with it to see if I can figure it out, but if you have any ideas that would be great.

0


Hey David, I just checked code that I've sent you and it works fine for me https://moderatorvlad.zendesk.com/hc/en-us
(category "General" always links to an external link).

But sorry, I missed that you need it for articles, ahh, that changes some things. You are right, these ways will not work on Search results page. So when user click on your specific article, he should be redirected to an external link?

if yes, please try this one, put this code on the very top of your article HTML template (replace 88888 with the id of your article).

{{#is article.id 88888}}
<script>
window.location.replace('https://drive.google.com')
</script>
{{/is}}

 

 

0


Post is closed for comments.

Didn't find what you're looking for?

New post