Custom homepage template
-
@its-brad You can install
nodebb-plugin-custom-pages
and config it like this:Then go to ACP -> Extend -> Widgets and look for
home.tpl
to customize it your way with all the widgets you want.
Then go to ACP -> General -> Homepage and choose this new page to be your homepage (in this example the custom path will be/home
).
And it's done.I think this is the only way to do what you want. This is a great plugin too if you want to extend your forum pages and it is not heavy at all.
-
I don't think this is possible without a plugin. Just adding a new template won't work. You need something to add an express.js route.
-
nodebb-plugin-custom-pages
-
@PitaJ said in Custom homepage template:
nodebb-plugin-custom-pages
@its-brad It's this plugin right here, not the
nodebb-plugin-custom-homepage
oneFollow these steps I told you, it's very simple:
@jtsimoes said in Custom homepage template:
@its-brad You can install
nodebb-plugin-custom-pages
and config it like this:Then go to ACP -> Extend -> Widgets and look for
home.tpl
to customize it your way with all the widgets you want.
Then go to ACP -> General -> Homepage and choose this new page to be your homepage (in this example the custom path will be/home
).
And it's done.I think this is the only way to do what you want. This is a great plugin too if you want to extend your forum pages and it is not heavy at all.
-
@its-brad you could try using custom-homepage instead then, I think it uses a single template file.
-
@pitaj @its-brad sorry for digging up an old topic - I'm looking to do something similar here and was curious if you managed to get this to work ? For example, I'm looking to add the
breadcrumbs.tpl
template into thecustom-homepage
template, but it doesn't seem to workInterestingly, I also get a 404, which I'm unsure if this is related
-
Did you rebuild after making the change? Is the plugin activated? Is there an identical homepage.tpl and also a homepage.js file in nodebb/build/public/templates?
-
Did you rebuild after making the change?
Yes
Is the plugin activated?
Yes
Is there an identical homepage.tpl and also a homepage.js file in nodebb/build/public/templates?
Yes
However, the change I entered into
homepage.tpl
has not been reflected on build (theimport
line is missing) -
Please use code blocks instead of screenshots. It's much easier on mobile.
However, the change I entered into homepage.tpl has not been reflected on build (the import line is missing)
The import line should be replaced with the template it refers to. I think your problem is that you're over specifying the path. It should be just
<!-- IMPORT partials/breadcrumbs.tpl -->
-
@pitaj said in Custom homepage template:
The import line should be replaced with the template it refers to. I think your problem is that you're over specifying the path. It should be just
<!-- IMPORT partials/breadcrumbs.tpl -->This didn't work either. This is actually the first way I tried it. Same issue.
-
@phenomlab what's the build output with it like that?