we-core
Version:
We.js is a node.js framework for build real time applications, sites or blogs!
19 lines (17 loc) • 443 B
JavaScript
/**
* We {{{we-breadcrumb}}} helper
*
* usage: {{{we-breadcrumb}}}
*/
module.exports = function(we) {
return function breadcrumbHelper() {
if (!this.breadcrumb) return '';
if (typeof this.breadcrumb == 'string') {
return new we.hbs.SafeString(this.breadcrumb);
} else if (this.breadcrumb && this.req){
return new we.hbs.SafeString(this.breadcrumb.render( this.req ));
} else {
return '';
}
}
}