What is mean by the html template: no-widget-class and no-widget-target

General Discussion

Suggested Topics


  • 0 Votes
    2 Posts
    672 Views

    That partial is on all pages that display a list of topics ie /recent /unread /popular and /category pages. You need to create a plugin and add hooks for those pages the hook format is filter:<template_name>.build in those hooks you need to go through the topics array and subtract one from each topic's postcount.

  • 0 Votes
    7 Posts
    2k Views

    Thanks a lot! It works if it's a relative path, not if it's an absolute path with a domain name...

  • 0 Votes
    3 Posts
    2k Views

    Ya, so I was dumb...I have a local dev instance and a staging server. I was playing around with some things and forgot to switch the theme back to vanilla which explains why I was missing the navbar for the login screen...boo me.

    But yes, thanks for pointing that out. The template engine and middleware are making a lot more sense now after looking through the source for the last 2 days...

    I'm going to start looking to add/update the documentation here soon...some of the stuff can drive you crazy if you aren't familiar with the version changes.

    Also, after reading through most of core at this point I have to say it's an impressive piece of kit. Thumbs up to the core devs. @julian @baris @psychobunny

    EDIT: Also, anyone else who comes across this thread...if you really want to save yourself some time banging your head against the wall -- like I did -- take a few days to really dive into the nodebb source. It has been a good lesson in object-oriented javascript -- so many objects 🙂 -- done right. I've realized I'm approaching things more from a functional perspective, so this has been an eye opener for me.

  • NodeBB target users

    General Discussion
    1 Votes
    13 Posts
    4k Views

    Very valid points, gentlemen, thank you. 🙂

  • 0 Votes
    2 Posts
    1k Views

    hey @draco2003

    http://try.nodebb.org/topic/142/nodebb-plugin-static-page-static-pages

    this plugin shows you how to create new routes, and static templates. I should update this example to show how to utilize dynamic templates but it would be something along the lines of

    module.parent.require('path/to/templates.js').parse(templateData, templateVars);

    (totally off the top of my head... but yeah when I get the time I'll update the plugin to do the above)