When installed and added to the active theme, this theme component enables you to control the ‘homepage’. This can be for all users, anon (non-logged in), mobile users, or according to a user’s primary group. Initially developed by @pfaffman. See User-specific Discourse home page.
You want something other than the ‘normal’ homepage
You want a different homepage for Anonymous users
You want a different homepage for Mobile users
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.
custom default homepage
Allows you to set a global custom homepage.
This enables you to use a specified page for those who aren’t logged into your site. Over-rides the global one above.
As per Force Mobile Homepage this allows you to set a different homepage for mobile users. This will override the options chosen above.
group page map
This 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.
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 can only direct to a valid Discourse relative URL. Unfortunately, this doesn’t include Page Publishing.
Hello!! This is awesome!!
Thank you very much, this is actually important for my my case (use-case 1).
I have to ask, about " The users with a specified group as primary will not be able to reach your ‘normal’ homepage", what do you mean by “actively provide a way for them to do that” ?
Also, in line with this concept, it will also be useful to show in the homepage a specific order of the categories depending on which group the user belongs to. For example, to show their category at the top, and all the rest below of that. Do you think this is possible? (if not already?).
It means that whatever home page you set in the site settings will be overridden. So if you want users to be able to get there then you’ll need to see that there is a link to get there… Somehow.
I can’t imagine how that would work (maybe I have a bad imagination ). The use case that I can think of makes users have a different category set as home if the are in a group. Like a car site could let you choose the Ford group as your home page.
If you want different stuff available for different groups then I think you’d do that by having default muted categories.
Thank you for your answer
Lets say I would like to have different categories “pinned” at the top depending to which group a user belongs to. I mean, each different user would see a different “pinned” category. I don’t want to hide the other categories from the user, just make easily visible and readily available the one they will be using the most, right from the homepage (if possible!).
(of course, I’m not “demanding” anything here, just asking if it’s possible with available settings/components)
In my case I set up my advertiser’s client category as homepage with this TC, but they just found it confusing and asked me to remove it again. Hence I think the showcased categories tc with such a modification would be the perfect solution.
Are you sure that’s the most recent version in github? (Not your fork or a static/local version?) I just ran an upgrade and it’s working. Also looking at the code, there’s only one place where api is used: