UPDATE:
The version using jade mixins is used here. Unfortunately, I can not find the variable "user" in the list of attributes in the brackets of the tag "a".
mixin userLink(user)
a(href="/" + user)= user
mixin userLink("Bob")
mixin userLink("Alice")
mixin userLink("Cooper")
Creates this HTML
<a href="/undefined"></a> Bob
<a href="/undefined"></a> Alice
<a href="/undefined"></a> Cooper
Just put the helper function in your locals object and call it from the template
locals = {userLink: function(userName) { return "<a href=....."}}
jade.render('myview', {locals: locals})
:
= userLink(user)
, dynamicHelper.