Thank you once again @Don for your fast support, and @nathank for your input
The strong support of this community has been all in this path I have been pursuing 2 years now… :')
Both your inputs made me realize of a strategy to solve this apparent sphinx riddle. So I finally got it sorted out this way:
Objective:
- In desktop, send a user to a custom homepage as per his group.
- Have the forum icon linking to the categories page.
- Have a custom header “home” icon linking to the custom homepage.
- Have the same on mobile, except that the first homepage be the chat room.
Steps:
- Disable “force homepage on mobile” in the “Custom Homepage” plugin, and leave only the homepage per group options active.
- Change Logo link to redirect to full forum via (thanks @Don!):
<script type="text/discourse-plugin" version="1.3.0">
api.changeWidgetSetting('home-logo', 'href', '/categories')
</script>
-
Make new header icon link to redirect to custom homepage (use plain forum URL for this effect).
-
Use this handler in the case the user is on mobile:
<script>
if (window.location.pathname == "/")
{ window.location.href = "/chat";
}
</script>
This is nice in that a user can change his preference for a custom home that will be obeyed both on desktop and mobile (via the new header icon). I’m forcing chat as homepage for mobile because I assume that it will be the most recurring use-case there.
And thats it! it works like a charm
Thanks to all of you once again