yes, it's the solution i have chosen. Thx !
Custom homepage template
-
Is there a way to have a simple homepage template (e.g. home.tpl), without needing the nodebb-plugin-custom-homepage plugin? I see references to it in some older posts but not sue what the current state is.
-
@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.
-
@jtsimoes Thanks. I'd prefer not to have to code via, and be confined to the containers of, the widgets. Is there any way to have direct access to the HTML like i do with custom themes?
-
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.
-
@its-brad If there is a ready-to-use front-end interface, I'd rather use it than having to manually change the files
And the Custom Pages plugin is really good, you should consider install it
-
@its-brad said in Custom homepage template:
Is there any way to have direct access to the HTML like i do with custom themes?
And if you choose the HTML widget, you can put there any HTML code freely
-
@jtsimoes Maybe, things like that don't generally feel powerful enough for my needs. If i create a theme I'd like to have more control of the homepage. I'll play around with it though.
-
What does this refer too?
-
@its-brad What NodeBB version and plugin version are you using?
I'm not getting that on Widgets page...
-
@jtsimoes I guess my question is more "where is home.tpl"? I think that is from nodebb-theme-quickstart
-
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.
-
Thanks, but yeah again, im looking for a file on disk that i can version control and share across the team. Seems that may not be possible though.
-
@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?