Public
Occasional Commentator

Changing forum category images

Hey everyone, 

 

first time posting, hoping to get help with the forum I just started working on. When I add new category to the forum, it repeats the same picture image (please see the pandas in attached screenshot at the bottom). I want to have a different image associated with different categories, so far I went into Studio > Component. And closest thing I found was: <img src="${asset.get(categoryImage)}" alt="${forumCategory.title}">

 

However, I can't find where i can edit categoryImage in my assets. Am I looking at the right place? Thanks in advance, would appreciate any advice Smiley Happy

 

Paul

lith_community_example.JPG

 

2 Replies 2
Honored Contributor

@psl  You can use a workaround to get it. You can set the images on the bases of the ID of the boards. 

a) If you are using custom component. 

Upload the images with the same name as the id of the board. When traversing in list just need to use as below

<img src="/html/assets/${board.id}" />

b) Using OOTB

You have to do it using CSS

As every board has a unique id. i.e(in my case id is welcomeguidelines). See SS here also.

.lia-node-welcomeguidelines .board-icon span.lia-fa-icon.lia-fa-blog.lia-fa {
  background: url("/html/assets/new-icon.svg");
  background-repeat: no-repeat;
  background-position: left 0px top 0
}

 

https://prnt.sc/hczequ

 

I updated an image on the blog here. For blog icon, CSS will be like (mathclubblog is the id of blog)

.lia-node-math-club-blog .board-icon span.lia-fa-icon.lia-fa-blog.lia-fa {
  background: url("/html/assets/group-icon.svg");
  background-repeat: no-repeat;
  background-position: left 0px top 0
}

https://prnt.sc/hczl4d

 

 

 

Give kudos if you find my posts helpful or mark solution if it answers your query
Occasional Commentator

@VikasB Thanks! I'll give it a try 🙂 

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.