visionmedia/jade — Issue #510: Dynamic append of a class
Author: panosru
Created: 2012-02-20 14:23:40+00:00
State: open

Hello, I have the following helpers from express:

dynamic helper:

```js
current_route : function (req, res) {
return req.url;
}
```

static helper:

```js
isActive : function (route, current) {
if (route === current) return '.active'
}
```

What I want to accomplish is to use something like this `li#{isActive('/', current_route)}: a(href='/')` in order to be transformed into this `
...`, of course I know that I can have `return 'active'` in my helper and use it like this: `li(class=isActive('/', current_route)): a(href='/')` but I just wondering if I could use it in a different way instead of `li(class=...`

Thanks