Blogger Has Added New Conditonal Expression


Hi! Guys

According to the latest update blogger has added a new conditional expression.

As Confirmed By Luke Bjerring

Previously, the expressions in Blogger’s templates could

• Add or concatenate values with +

• Subtract values with -

• Check for equality with != and ==

• Compare values with <, >, <= and >=

Now, support has been added for many more expression operators, including:

• Inversion of true/false values with !/not e.g. <b:if cond=’!data:post.allowComments’>…

• Picking between 2 values with ?: e.g. <a expr:class=‘data:post.allowComments ? “comments” : “no-comments”’ …

Checking if a value is a member of a set or array, with in/contains
e.g. <b:if cond='data:blog.pageType in {"index", "archive"}'>...

• Combining multiple conditions with and/or
e.g. <b:if cond='data:blog.pageType == "index" and data:post.allowComments'>...

• Changing the order of operations with ()
e.g. <div expr:style='"max-width: " + (data:width + 10) + "px;"'>...

For Help visit this link


That was such a useful info by you @HassanTahir. I am really impressed. Blogger has also made advance changes to the conditional set of tags which are the widget tags for Layout and the only thing that is still missing is the tag for Mobile screens. I would have really appreciated if they could have added the possibility to control widget Contents for different mobile screen sizes just like we control HTML DOMS using CSS3 media queries