BCHK
(Bcguy)
October 16, 2021, 12:09am
1
I am using the news plugin by Pavillion on my new forum-centric website.
I’m implementing it similar to the way its implemented here:
But I was wondering what people here feel is the best way to implement the redirect to the /news directory?
Is it a 301 redirect? Or something else? Are there tradeoffs? Any help greatly appreciated.
2 Likes
pfaffman
(Jay Pfaffman)
October 16, 2021, 12:29am
2
3 Likes
rberger
(Rberger)
October 17, 2021, 2:55am
3
Is there a way to make Custom Homepage for Groups work for non logged in users or users of any group? I.E. a default alternative home page for those who are not specified otherwise?
2 Likes
Johani
(Joe)
October 17, 2021, 3:25am
4
I’m not very familiar with the news plugin, but it looks like it adds a new route at /news
So, you can use something like this in the header tab of your theme to make that route the default homepage for all users.
<script type="text/discourse-plugin" version="0.8">
const { setDefaultHomepage } = require('discourse/lib/utilities');
setDefaultHomepage("news");
</script>
6 Likes
BCHK
(Bcguy)
October 17, 2021, 5:51am
5
Hi Jay. I’ve loaded your Custom Homepage for groups and it looks good.
One thing we don’t understand from the explanation of the theme component… does it support anonymous / non-logged in users?
Can we identify this null group and direct them to a given path?
It doesn’t seem like we can from the little documentation associated with the plugin, but I may be misreading it.
Any help greatly appreciated.
2 Likes
pfaffman
(Jay Pfaffman)
October 17, 2021, 7:49am
6
I think that you can use the group everyone
, which includes anonymity users, but I haven’t tried. The above post looks like it’ll work and is pretty simple.