Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to IF NOT inside of {{ #each }} template

How can I render this Meteor Blaze Template ? I would like to use the negative of the IF, but I don't find anywhere how to use it.

<ul> {{#each pages}}   {{#if (--NOT--) isCover }}     <li> some content {{value}} </li>   {{/if}} {{/each}} </ul> 

Previous research not found solution https://github.com/meteor/meteor/wiki/Using-Blaze Check for equality in Spacebars?

Note: if I use only the if statement is working without problem, also I could do and else but I would like to have it only with the if(!isCover) solution

like image 233
ncubica Avatar asked Nov 28 '14 05:11

ncubica


People also ask

What is <> In Excel formula?

In Excel, <> means not equal to. The <> operator in Excel checks if two values are not equal to each other.

Is not empty in Excel?

The <> symbol is a logical operator that means "not equal to", so the expression <>"" means "not nothing" or "not empty". When column D contains a value, the result is TRUE and IF returns "Done". When column D is empty, the result is FALSE and IF returns an empty string ("").


1 Answers

You need to use the {{#unless}} block helper.

http://blazejs.org/

{{#unless isCover}}   <li> some content {{value}} </li> {{/unless}} 
like image 62
saimeunt Avatar answered Sep 21 '22 05:09

saimeunt