Recent searches


No recent searches

Brands and code



Posted Apr 29, 2022

Hi dear community,

Is there are way to apply css/js or code in general to all brands? I'm currently trying to add the "Note:" functionality (yellow box) that Zendesk has in their articles but this will require that I add the css class to all themes and brands we have. Is there a way to optimize this process ?

Thank you


0

15

15 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Carlos,

Unfortunately each theme is it's own individual package (essentially they're all their own individual websites) so you'll need to update this on each.
 
Thanks! 
 

0


Is there a way to change the Submit a Request Tab in the Header to Contact Support? Is there a different code that needs to be entered in that place? I changed the name but it just removed the Tab from the Header on the Web Page

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey Crystal,
 
Try replacing the "new_request" link helper in the header file with the code below: 
{{#link 'new_request' class='submit-a-request'}}
Contact Support
{{/link}}
Here's a link to the docs which you might find helpful, as well:
Feel free to reach out with any questions!
 
Tipene

0


Tipene, this code worked! I am now trying to figure out how to change the Title from "Submit a Request" to "Contact Support"

I see the code  <li class="item">{{link 'new_request' role="menuitem" class='submit-a-request'}}</li>

Would the above code be the one that I need to change?

 

 

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Glad to hear it worked! With regard to the title, are you referring to the text in the screenshot below?
 

0


Tipene Hughes Thank you, 

I am now trying to figure out how to change the Title from "Submit a Request" to "Contact Support"

I see the code  <li class="item">{{link 'new_request' role="menuitem" class='submit-a-request'}}</li>

Would the above code be the one that I need to change?

0


Tipene Hughes I am referring to the Title in the screenshot below. I would like for it to read Contact Support, rather than Submit a Request

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Thanks for clarifying! To change the title on that page, you'll need to update the code in the new_request_page.hbs file, specifically within the <h1> tag. Something like this should do the trick:
 
<h1>
Contact Support
<span class="follow-up-hint">
{{follow_up}}
</span>
</h1>
 
One thing to be aware of is that t (translation) helper provides translated text for each locale available in your Help Center. If this is something you need to still have in your help center, you should be able to achieve the same using dynamic content.

0


Tipene Hughes You are Awesome!! Thanks for saving my day :-)

0


Tipene Hughes I have one more request, how can I add branding logos to the home page? I have 2 search tabs for our products which have different branding logos and I am having a hard time figuring our where to plug the logos. I've added a screenshot below

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey Crystal,

There’s a few different ways you could do this, all of which will require a little bit of custom HTML and CSS. One approach could be creating an img element with the image src set by the asset helper, which would live within the li element under the #each helper of either categories or sections in your home_page.hbs file:

{{#each sections}}
   <li class="blocks-item">
       <img src={{asset 'example.png'}} class="blocks-item-img"/>
       <a href='{{url}}' class="blocks-item-link">
           <span class="blocks-item-title">
               {{name}}
            </span>
            <span class="blocks-item-description">{{excerpt description}}</span>
       </a>
   </li>
{{/each}}

You can learn more about adding assets to your help center, here. Next, you'll need to add CSS styling to the images which you can do in the style.css file. First thing will be to add "flex-direction: column" to the .blocks-item selector. Next, you'll add styling specifically to image. Here's how that all looks together:

.blocks-item-link {
  color: $brand_color;
  padding: 20px 30px;
  display: flex;
flex-direction: column; /* new code added */
  flex: 1;
  justify-content: center;
  border-radius: inherit;
}

.blocks-item-img {
  height: auto;
  width: 20%;
  margin: auto;
  padding: 10px 0 10px 0;
}

And that should be about it. Like I mentioned, there's a few different approaches you could take with this depending on how you'd prefer the image layout but this is one example that will get the job done.

I hope this helps!

Tipene

0


Tipene Hughes Whew, this is out of my league, Lol. I will see if I can figure it out. Thanks for all of your help

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

No worries, happy to help! All the best :)
 
Tipene

0


Hi,

Is there a way to code my header and footer to use the Brand name created instead of manually typing in the Brand name?

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Ral,
 
The help_center object is likely what you're looking for. You'll be able to use the name property to pull the brand name of the help center being viewed. Here's an example of how that is used in the header of the default Copenhagen theme:
 
 {{#if settings.show_brand_name}}
<span aria-hidden="true">{{help_center.name}}</span>
{{/if}}

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post