I am trying to understand how to set for exemple an userbar in my jade layout actualy I have my layout.jade:
doctype 5
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
include userbar
block content
In my include I only have the variable environment on my current page.
Don't bit me, I'll take an exemple in Symfony2 franmwork :D for exemple if you have this code in your layout
{% render "AcmeBundle:Acme:menu" %}
It will call AcmeController and the menuAction() method regardless the current page
I would like to have the same system: the render in my jade page will call for exemple a requestHandler
exports.userbar = function(req, res){
var user = 'ant';
res.render('userbar', { user: user })
};
And now this will render my userbar :) But I don't know how to do it with jade
If I am not clear ask me questions
Thanks :)