totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

Sharing view-helper between different partials #732

Closed buzzeins closed 5 years ago

buzzeins commented 5 years ago

Hi, how to share a viiew helper in different view-partials properly? For instance:

Helper:

@{helper article(item)}
<li>...</li>
@{end}

Views/Partials:

list.html

Each partial is gonna use the same helper. How to, without to replicate the inline helper?

thx

petersirka commented 5 years ago

Hi, you need to create helper in another way https://docs.totaljs.com/latest/en.html#api~global~DEF.helpers ... another way isn't possible.

buzzeins commented 5 years ago

even better, thx :D