How to add icons/symbols to article titles
Answered
Posted Mar 26, 2020
Hi, is there a way to add icons or symbols to the titles of the article? as example, we'd like to show the symbol of a camera for the articles for which we offer a video tutorial.
Thanks!
Carlo
0
24
24 comments
James Skene
1263169183150 do you have any suggestions for my previous post?
0
James Skene
Hi
We currently have the following structure Category - Section - Articles with the Category and Sections showing as below
Category:
How To section:
We have added 2 further sections under How To - Onboarding is there anyway I can add the icons and tiles to the subsections under Onboarding? I have tried copying the code used for the sections and adjusting but it didn't work and returned errors.
This is our code to show the sections under the category
CategoryHowTo.hbs:
<div class="container-divider"></div>
<div class="container">
<nav class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search scoped=settings.scoped_kb_search submit=false}}
</div>
</nav>
<div class="container">
<section class="section knowledge-base">
<h2 class="visibility-hidden">{{ t 'sections' }}</h2>
<h1> Hi {{user_name}}. Welcome to the How To section! How can we help you today?</h1>
<section class="categories blocks">
<ul class="blocks-list">
{{#each sections}}
<li class="blocks-item">
<a href='{{url}}' class="blocks-item-link">
{{#is name 'How To'}}
<img src= "{{asset 'Help_Centre_Icons_EA_FAQ_Icon_smaller.png'}}" class = "home-page-images" />
{{/is}}
{{#is name 'PLatform Navigation'}}
<img src="{{asset 'Help_Centre_Icons_1_EAU.png'}}" class = "home-page-images" />
{{/is}}
{{#is name 'Admin User Space'}}
<img src="{{asset 'Help_Centre_Icons_2_EAU.png'}}" class = "home-page-images" />
{{/is}}
{{#is name 'FAQ'}}
<img src="{{asset 'Help_Centre_Icons_3_1.png'}}" class = "home-page-images" />
{{/is}}
<h4 class="blocks-item-title">{{name}}</h4>
<p class="blocks-item-description">{{excerpt description}}</p>
</a>
</li>
{{/each}}
</ul>
</section>
</section>
</div>
</div>
</div>
</div>
0
Ifra Saqlain
hey,
1). Go to homepage and paste the code, I have added the icons beside the section title, you will need to update the section IDs and icons which you have already uploaded in your assets folder.
Home Page:
2). Go to the section page and paste this code, I have added the icon code here because you want to show the icon on the section page also.
Section Page:
3). Add your icons in your assets folder and the icon name would be like this:
section-2222222.png ,
section-00000000.png ,
section-9999999.png
the numbers are section's IDs.
4). Add this CSS code snippet at your stylesheet.
If any issue, let me know.
Have Good Day
Team
0
Justin Fain
Ifra Saqlain Apologies as I have misunderstood the implementation explained above.
This is the home page:
0
Ifra Saqlain
Hey Justin, unfortunately you provided the section page code in the above your comment so I fixed that code and shared with you anyway share your home_page.hbs template code then I'll add the icon's code and will share then you will need to copy and paste.
https://support.intego.com/hc/en-us it's home page of help centre so you need to add icons in the homepage code then that will work as you want.
0
Justin Fain
367066863047 Thank you for the help. I made the changes you suggested, but it did not have the intended outcome. I am trying to have the icon display next to each of the Section titles here:
https://support.intego.com/hc/en-us
However, after making the changes it only appears inside of the specific section, and is quite large.
Ideally, it would appear here:
Is there a different code change I should be making for this? Thanks again.
0
Ifra Saqlain
Hi Justin Fain, if you want to show the image before the section title, there would be change the position of icon/image. I have updated your code , you need to copy and paste, add the section IDs in the {{#is...}} condition and add the images which you have been upload in the assets folder of your theme.
If any query let me know :)
Team
0
Justin Fain
I am also trying to add an image before the title of a section, but it is not working for me as I would expect. I have uploaded the image asset and entered the line. Any idea what I am doing wrong?
0
Ifra Saqlain
Go through this article for adding the font awesome icons:
Step 1. Add font awesome library in the document template.
Step 2. Add font awesome icon on any template where you need.
see how I add the library and icon on the template
https://support.zendesk.com/hc/en-us/community/posts/360033529353-Guide-customization-tip-Category-blocks-customization-with-icons-on-mouse-hover
And
If you have images then you can upload that in assets folder in you HC.
If you have svgs then simply add on any template.
0
Carlo Dalessandro
How do you use the Font Awesome icons? you upload them in the assets?
0
Sign in to leave a comment.