Skip to content

Instantly share code, notes, and snippets.

@moderatorwes
moderatorwes / zendesk.html
Created November 9, 2016 16:34
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>
@moderatorwes
moderatorwes / Category.html
Last active July 21, 2022 14:45
Zendesk: Accordions for Copenhagen theme - Live example(https://zenultra.zendesk.com/)
<!-- Add this code if you would like accordions on your Category Page -->
<div class="container-divider"></div>
<div class="container">
<nav class="sub-nav">
{{breadcrumbs}}
{{search submit=false}}
</nav>
@moderatorwes
moderatorwes / article.html
Last active May 30, 2022 09:59
Zendesk: Embed PDF
<!--Add this to your article page using the Source editor -->
<iframe src="https://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
@moderatorwes
moderatorwes / zendesk.js
Last active June 8, 2021 00:47
Zendesk: Send Category to Community (Humble Squid Theme)
//send category links to community - Change category and google.com to your helpcenter
$('a').each(function() {
var value = $(this).attr('href');
if(value=='/hc/en-us/categories/200108526-Technical')
{
$(this).attr('href', 'http://google.com');
}
});
@moderatorwes
moderatorwes / zendesk.js
Last active September 9, 2020 17:13
Zendesk: Re-direct users to My Activities if End User
//re-direct end users to My Activities
if(HelpCenter.user.role=="end_user"){
location.href="https://yoursubdomain.zendesk.com/hc/en-us/requests/";}
@moderatorwes
moderatorwes / document head.html
Last active August 13, 2020 21:22
Zendesk: Alert Notification with Promoted Articles
//Link to Font Awesome for the icon
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
@moderatorwes
moderatorwes / zendesk.css
Created December 18, 2015 03:16
Zendesk: Custom Category Boxes with SVG icons
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,200);
@import url("https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.5/cyborg/bootstrap.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.css");
body {
font-family: 'Source Sans Pro', sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
@moderatorwes
moderatorwes / zendesk.js
Created March 2, 2016 20:29
Zendesk: Hide default system fields on Zendesk Ticket Form
//hide system fields based on ticket forms(change subdomain and form id)
if (window.location.href == "https://yoursubdomain.zendesk.com/hc/en-us/requests/new?ticket_form_id=11111") {
$('.request_subject').hide();
$('.request_description').hide();
$('.form-field label:contains("Attachments")').hide();
$('#upload-dropzone').hide();
}
@moderatorwes
moderatorwes / article.html
Created April 12, 2016 13:39
Zendesk: Formatting Tags
<ul class="tags">
Tags: {{#each article.labels}}
<li class="tag">{{identifier}}<li>
{{/each}}
</ul>
@moderatorwes
moderatorwes / zendesk.css
Created July 8, 2014 20:55
Zendesk: Change Font Size for WYSIWYG editor
/* CSS class for WYSIWYG editor */
.articlefont-small{
font-size: 12px;
}
.articlefont-medium{
font-size: 16px;
}
.articlefont-large{
font-size: 32px;