node.js - include into if with nunjucks in nodejs -


i working on user's system nodejs. used express , nunjucks. trying render template when user logged site , anoter template when user logoff.

{% if isloging %}         {% include "toolbar_guest.html" %} {% else %}         {% include "toolbar_guest.html" %} {% endif %} 

but not working... if try this:

{% if isloging %}         connected {% else %}     not connected! {% endif %} 

its work..

{% include 'toolbar_user.html' if islogging else 'toolbar_guest.html' %} 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

java - How to implement an entity bound odata action in olingo v4.3 -