BCHK
(Bcguy)
Octobre 16, 2021, 12:09
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 « J'aime »
pfaffman
(Jay Pfaffman)
Octobre 16, 2021, 12:29
2
3 « J'aime »
rberger
(Rberger)
Octobre 17, 2021, 2:55
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 « J'aime »
Johani
(Joe)
Octobre 17, 2021, 3:25
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 « J'aime »
BCHK
(Bcguy)
Octobre 17, 2021, 5:51
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 « J'aime »
pfaffman
(Jay Pfaffman)
Octobre 17, 2021, 7:49
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.