Category homepage as default?

Thank you. Looks like this will take away the ability of the user to change his preference?

I would like to do a one time update and then let the user change it per his/her preference. Thoughts please?

I will answer my own question, based on a little experimentation.

This command from rails c resets the home page view preference of all users to site default.

UserOption.where("homepage_id IS NOT NULL").update_all(homepage_id: '')

1 个赞

Right. I forgot that feature when I did this, and the problem I was solving was making a single category the home page. Your change of all user settings may be what you want, but if you want to change for all users why not just change the value globally? I must not be reading carefully enough.

If you are meaning the site setting on the front end by ‘global change’, I found that the site setting change does not override the user preference if they already have updated it .
Resetting any user’s preference back to NULL makes it align to site default. I hardly had anyone who had a user preference though, which was interesting.

谢谢,通过快速谷歌搜索(幸运的是,在搜索结果的第一条)找到了这个关于“将 discourse 分类设为主页”的方法,非常简单。 :+1:t2:

2 个赞

有一个更简单的方法可以做到这一点!只需转到“管理员”>“设置”>“基本设置”>“顶部菜单”。然后,您可以重新配置要首先显示的页面以及它们的顺序。第一个页面将是默认页面。