I did a theme where I don’t want users be able to change the default homepage on an individual basis:
Is there a way to disable this option? And could we re-define the default homepage for all users that have changed the option previously?
I did a theme where I don’t want users be able to change the default homepage on an individual basis:
Is there a way to disable this option? And could we re-define the default homepage for all users that have changed the option previously?
You can hide it with CSS in your theme.
And when you change the default it will offer to update the user’s settings.
That sounds like what I’d be looking for, but I’m not offered an update when I change the settings here:
Oh. I may be wrong about that, then. Some settings let you do that, but not this one, I guess. Sorry. But maybe these will help:
See Administrative Bulk Operations or Edit a user setting for all Discourse users.
Ah yes, thanks for pointing me in the right direction @pfaffman
The command on the rails console that worked:
UserOption.update_all(homepage_id:2)
And I hide the option with CSS:
.user-preferences-page {
.control-group.home {
display: none;
}
}
@nolo I’m curious: which page did you theme?
I’ve noted the top menu
must contain at least “latest”, but haven’t used it for any amount of time to see if the various contexts for the top menu change it; for instance, “My Posts”, or “Unread”.
I find your decision to funnel folks to a single homepage an interesting option.
(I normally set my home page to Unread, since I can just drop in real quick on many sites .)
I use various components on Categories as the landing page and right now they are all set to the homepage route. So when users change the default homepage it gets messed up. I guess I can make it work down the line, so users can pick Latest as their homepage again. But it’s not a super quick fix and I need to fix it now
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.