When installed and added to the active theme, this theme component allows setting a user home page according to their primary group. It was written by @pfaffman. See User-specific Discourse home page.
- You have a group of folk only interested in using a small slice of your instance. They want to only see their specific category.
- Temporarily redirect a group of your punters to a special event or the like.
- Have different landing pages for different groups.
There is a Theme Setting called
group page map that allows for multiple entries. Each entry should be of the format
group_name:path , where
group_name is the group slug (not the group
Full Name ) and the
path is the desired home page (e.g., “/c/great-category/4”).
Ensure that the target users have the specified group denoted as their primary group and you are away. If the theme setting or the user primary group is changed, a reload will be required to have the change take effect.
An earlier release of this component, which I think no one was using, used a comma (
, ) rather than a colon (
:) to separate the
path. Though this still works, support for that format may be removed in the future.
Anonymous (i.e., not logged in) users have a null
primary_group_name , but a logged in user will have a
primary_group_name of ‘undefined’. To have a different default home page for logged in vs anonymous users, you could set the global default home page to some page encouraging users to log in and use this component to set the home page to, say
The users with a specified group as primary will not be able to reach your ‘normal’ homepage unless you actively provide a way for them to do that.
- It doesn’t seem to be able to redirect to a Published Page, giving this error:
Oops! That page doesn’t exist or is private.
- Old group flair images seem to sometimes be lost once this component is activated for that group
- Improve explanations within the component
- Adding a path back to the ‘normal’ homepage as part of the component.
|Install Guide||How to install a theme or theme component|
|New to Discourse Themes?||Beginner’s guide to using Discourse Themes|