Different category page style for a specific group

AI-generated summary

The discussion revolves around creating a different category page style for a specific group. jose.daniel.lardizab inquires about the possibility of forcing a different category page style setting for a specific group. awesomerobot suggests that it’s possible with a theme component, and shares a link to a related theme component that can be used as a starting point.

jose.daniel.lardizab thanks awesomerobot for the help and plans to use the component to assign a specific theme to a group. nolo mentions a component that adds group classes to the body, but notes that it’s not suitable for changing the category page style.

awesomerobot creates a theme component called “Group Categories Page Override” (https://meta.discourse.org/t/group-categories-page-override/223560) that might solve the issue, and invites jose.daniel.lardizab to try it out.

Curious.

Is it possible to force a different category page style setting for a specific group or primary group?

It should be possible with a theme component, but as far as I know no one’s built one.

There is a theme component available that makes it possible to use a different category page layout for a specific theme… and it seems possible to use this as a starting point to build a component that can do the same based on group membership.

4 Likes

Hi @awesomerobot!

Thanks a lot for your help. I really appreciate this.

After installing this theme, I can possibly use this guide of yours here to assign this specific theme with the added component, right?

1 Like

@falco wrote a component that adds all group classes to the body. I’m using this for similar cases:

https://github.com/discourse/discourse-groups-css-classes-in-body/

Edit: ah sorry.. you want to change the site setting, not the CSS styling. that’s only the above approach then I guess.

3 Likes

Unfortunately it’s more complicated than that, changing the category page takes more than CSS changes, so that linked method won’t work.

I had a little time and it seemed useful, so I put together a theme component that might cover what you are looking for, called Group Categories Page Override, give it a try!

3 Likes