Category Icons

Actually, I checked this again and that assessment of the problem doesn’t seem to be accurate. It seems like any slugs that have some of the same words as another will not work despite not using partial.

If I’m already using these slugs:

midi
deprecated

Then I can’t use:

midi-deprecated
midideprecated
mideprecated
deprecated-midi

somehow it won’t distinguish it as a different slug I guess

in the end, I had to use: abcd

2 Likes

Hello. Can I make category icons on colored round background like nodebb? This makes the icons look prettier

2 Likes

Yes that should be doable using some CSS.

3 Likes

Hi. Can you add a category style setting to make it look like this?

Is this what meta is using on #howto?

1 Like

@MarcP

I believe this component is for adding icons to category badges. That is, wherever you see the category appear in things like topic lists, title bar, etc. where it normally has a square with the category color and the category name.

Screen Shot 2022-07-04 at 3.49.38 PM

Whereas the icons shown in the #howto category are simply using the built-in Category Logo Image setting found in the settings when editing a category.

3 Likes

Thanks for clarification, in the mean time I found out that what I was asking is core functionality indeed.

3 Likes

Would it be possible to make the category lock icon also apply to the #sidebar?

I note that the code is here but based on this I suspect that a core change in the sidebar might be needed too:

2 Likes

It probably has been brought up before, but we can’t change a category color when the category style is none anymore, this notice is rendered instead:

You can’t select colors because you have a category style of none.

Currently, we need to change the style to something else, change the color, and reset the style to none.

On another subject, I assume we still need core changes to be able to replace categories and tag icons in the sidebar to follow what’s set in these theme components, right?

3 Likes

Yep. Here’s the #bug topic about this, with some discussion:

2 Likes

Any plans to update this to have icons for categories in the sidebar?

7 Likes

Hello,

great component, thank you so much for it. I implemented it and it works on any category for me - except one… I put in the correct slug, partial and exact. No icon. Hm.

Any idea?

Regards,
Roi

1 Like

This. Would be great.

1 Like

For me it dont work at all.

1 Like

Can you elaborate on the way in which it does not work? Nothing shows up?

1 Like

I think there are some bugs with matching. I have a category commblog, and I could not assign an icon to a commblog-review category. I ended up working around it by calling it community-blog-review instead. (The match / partial config didn’t seem to help, but maybe I was doing that wrong.)

Honestly, ideally, instead of the kind of klunky table-based config, it’d be really nice if this could be set on the actual config page for each category. I understand that’s probably not possible (or at least, not easy!) with a theme component, though.

3 Likes

That is indeed not possible with a theme component. However, it’s in our plans to add icon support to tags and categories in core in the near future, quite possibly some time in 2023.

7 Likes

That’s excellent — I’m looking forward to it. Hopefully this will also resolve my long-standing sadness about category color configuration, too. :slight_smile:

2 Likes

Nothing shows up I followed all instructions but nothing

1 Like

Have you used theme components before? Do you have it configured for your current theme?

2 Likes