I need to write logic to check whether the value is empty or it has string. Any help on this.. i tried this following. but it doesn't work in nodejs and throwing error
{@if cond="'{notes}' != '' || '{errors}' != '' "}
display html
{/if}
I need to write logic to check whether the value is empty or it has string. Any help on this.. i tried this following. but it doesn't work in nodejs and throwing error
{@if cond="'{notes}' != '' || '{errors}' != '' "}
display html
{/if}
The
@ifhelper is deprecated and should not be used. However, based on the code you've given, you should probably be able to use an exists check.If that doesn't work for some reason, you could use the
@nehelper.If that still isn't good enough, you could try writing a context helper. The documentation on dustjs.com is excellent.