Force Mobile Homepage

Currently the default homepage settings found in the admin panel and user preferences apply to both desktop and mobile. This is a very simple theme component that will allow you to specify a different default homepage for the mobile view of your Discourse forum.

It is important to note that this will force mobile to navigate to the homepage you choose in this theme component. Your users will not be able to override the default homepage for mobile via their user preferences at this point.

Repository Link
https://github.com/tshenry/discourse-force-mobile-homepage

I don’t know if there’s anything to gain by including screenshots or putting a demo on theme-creator, but if anyone thinks otherwise, please speak up!

Theme Settings

There is one setting that allows you to set the mobile homepage as:

  • latest (default)
  • categories
  • new
  • unread
  • top

Installation

If you are new to installing theme components, check out @Johani’s excellent guide on theme components, particularly how to import a theme component and how to add the theme component to your main theme.

Future

  • Allow users to override the default we set in this component.

That’s it! Questions, comments, and suggestions are always welcome :slight_smile:

53 Likes

Works like a charm. This is great mate!

4 Likes

Great little component, just what I needed for my community!

Many thanks.

1 Like

Can you please integrate this into core settings.

Sitewide default in settings for mobile and desktop.

And user setting in user profile settings for mobile and desktop.

:wink:

9 Likes

+1 for having different home page capabilities for mobile and desktop in core.

10 Likes

Thank you for this useful component.
Could you please help? While showing “Latest” by default on mobile, there is no option to choose “Categories” in top drop-down menu above topic list.

Exactly what I was after - thank you for this little component!

3 Likes

outstanding, thank you :pray::pray::pray::pray:

1 Like

Thanks for creating this! :handshake: How about future compatibility as the main Discourse app continues to evolve and is updated? Or is the theme component pretty future-friendly in that regard?

2 Likes

This Theme component is super-simple and pretty much bomb proof I reckon! Just a couple of lines of CSS and HTML with no settings or anything fancy.

3 Likes

I still feel this should be merged into core as an additional setting, it is so utterly useful!

9 Likes

A great and simple little component.

Of course the requests immediately started from our power users that they be allowed to set their own override preference.

This serves the vast vast majority of normal users, but there is still demand for the ability to personally override by the top 1% of power users.