🌕 🐮
[nodebb-plugin-custom-pages] Custom Static pages for NodeBB
-
AFAIK this problem appears because the plugin doesn't creates the .tpl file in your theme templates. So you can copy homepage.tpl from nodebb-plugin-custom-pages/templates to [yourtheme]/templates directory and name it like you named your page in ACP (mypage.tpl) as temporary solution.
-
@psychobunny when I install the plugin, I get the same internal error as reported in issue #10. For example:
-
@psychobunny which version are you referring to?
npm install nodebb-plugin-custom-pages
still produces this error. Is there a more recent version of the plugin available? -
@henrywright Try this:
cd ~/NodeBB/node_modules npm remove nodebb-plugin-custom-pages && rm -rf nodebb-plugin-custom-pages git clone https://github.com/rbeer/nodebb-plugin-custom-pages git checkout tplCopyIssue
-
@Guiri doesn't the clone URL need a .git on the end?
-
@leksar I tested this (copying the template file to the location where it's missing) and it worked. Thanks for sharing
-
@leksar Actually, I found a problem with that. After a forum restart, mypage.tpl is automatically deleted which results in the error appearing again.
-
Yes, I forgot the
.git
extension. You might need to manually delete and re-create the template in the system with the new branch. I don't remember, unfortunately, but it's been stable for a week now without a hiccup. -
Anybody know if there's a clever way to override the global sidebar using bootstrap or CSS? Since there's no longer a homepage route, my sidebar is in the global tpl. But for the custom page, I'd really like to be able to replace those.
-
Is there any chance we can get this working on 0.9.x, or is this pretty well not working at the moment?
-
@Arc it should work just fine on v0.9.x - it does for me. You have to install it manually via
npm install nodebb-plugin-custom-pages
in yournodebb
directory. -
@PitaJ It doesnt seem to, sadly.
It installed fine, and looked all good:
But after 3 restarts, one hard ./nodebb stop and ./nodebb start, and a reload:
Simply no luck.
-
@Arc try removing the leading slash in the route
-
@PitaJ ... Of course it'd be something that simple.
Thanks!
-
@Arc no problem. I've found that slashes in routes can cause lots of problems in NodeBB core and plugins
-
@PitaJ One more question, that I'm sure is just me using bad syntax again- how do you change the pageTitle? Name of page isnt working.
-
@Arc are you referring to the title displayed in the tab? I think that that feature isn't implemented yet, but not exactly sure.
-
@PitaJ Yeah. I can mod it with JS, but that's a nightmare from a web crawler standpoint. I guess I'll mod it in from the .tpl file, thanks!
-
Update for future generations:
Modifying page title in JS like so:
<script> document.title = 'TITLE HERE'; </script>
Actually isnt as bad as everyone says it is. Google lists it fine.
-
Any idea if this is working in version 1?
Suggested Topics
-
Unsolved Q&A plugin quesion
NodeBB Plugins • • junjun16818