Recent searches
No recent searches
Custom Icons for Categories on Home Page
Posted Oct 19, 2018
We recently switched to the new theme editor, and I'm having trouble figuring out how to reference assets in my homepage. We have icons for each category:
The asset name is the same as the category (e.g. Reports.svg). These were all set up under the old theme editor. This is the code we have in our home_page.hbs:
{{#each categories}}
<li class="flex-item">
<a href="{{url}}"><img class="head-icons" src="//p4.zdassets.com/hc/theme_assets/243990/115000000703/{{name}}.svg">
<p>{{name}}</p>
<h2>{{description}} </h2>
</a>
</li>
{{/each}}
The problem happens when I try to create a new Category under the new theme editor. The URL has apparently changed, and the image does not render. Under the new editor, how would I dynamically assign the image to the category?
0
2 comments
Trapta Singh
Hi @Tim,
Take a look at this tip: https://support.zendesk.com/hc/en-us/community/posts/115008316527-Adding-images-icons-into-the-Copenhagen-Theme
Let me know if this solves your issue.
Thanks
Team Diziana
0
Tim Nicholson
Thank you @Trapta! That is exactly what I needed!
0