Using template values in footer.tpl?

  • Plugin & Theme Dev

    From my spelunking around it appears that use of normal template values in footer.tpl is not possible (aside from {loggedIn}). Should the values available to footer.tpl be the same as the ones available to header.tpl? (Which includes values made available to config via the "filter:config.get" plugin hook).

    Would this be the right place to inject the config values into the footer.tpl?

    Any thoughts from the NodeBB team? I'd be happy to add some code and send a pull request, if you guys are open to a change here.

  • To be honest I don't know why the footer is rendered in the buildHeader function instead of here like the header itself. That way we can pass the same data we pass to the header to the footer as well.

  • Plugin & Theme Dev

    @baris Yeah, I can see how that would make sense. In custom routes, would developers then have to include both the header middleware and a footer middleware? That sounds reasonable and allows for easy customization.

    Is this something that one you guys would want to take on? Or should I write some code and send a pull request?


  • Open an issue on our github so we don't forget about it and link back to this topic I guess.

Log in to reply

Suggested Topics

| |