-1
這裏的想法:#if field == req.locals.variable,render handlebars template?
{#if creatorField == req.locals.user)
<div class="thisHTML">{{ story }}</div>
{else}
<div class="thatHTML">{{ story }}</div>
{/if}
如果creatorField不匹配req.locals.user值,然後採用不同的HTML模板將使。這是內置的功能,還是需要某種助手?
[Handlebars Helper for rendering template if creatorField == req.locals.user?](http://stackoverflow.com/questions/24422333/handlebars-helper-for-rendering-template-if-the -creatorfield-req-locals-user) –