Overview
When installed and added to the active theme, this theme component enables you to control the ‘homepage’, allowing it to be different from the set of pages Discourse allows by default, as well as having different groups have different “homepages” (e.g., group members care only or mostly about a particular category). 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.
Use-cases:
- 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.
Settings
custom default homepage
Allows you to set a global custom homepage.
anon page
This enables you to use a specified page for those who aren’t logged into your site. Over-rides the global one above.
mobile homepage
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 ensure that there is a way for them to do that (such as the native sidebar functionality)
Known Issue - limited to relative URLs
And that doesn’t include Page Publishing, unfortunately. However, you can workaround this by creating a permalink that will redirect to the external site and point to that permalink.
- @pfaffman tested this with a permalink at
/go-google
that redirects tohttps://google.com
and something likegroup-name:/go-google
- you create Permalinks via the admin settings
/admin/customize/permalinks