Blogger template designers: new Lambda Expressions offer more custom template flexibility

Starting today, we’re introducing a new set of operators, which we’re calling lambda expressions, that allow you to apply rules to whole sets of data (think posts, comments, or labels), rather than just individual instances.

For example:

Let’s say you wanted to add a flower image to all posts with the label “Flower,” for example. With lambda expressions, simply define a variable name that each item in the set will take, and then refer to the variable name as though it were each item.

<!-- Show a Flower image if the post has the label flower -->
<b:if cond='data:post.labels any (l => l.name == "Flower")'>
<img src=’/img/flower.jpg’ />
<b:if/>

Learn more on the official +Blogger blog:

https://blogger.googleblog.com/2016/05/more-custom-template-flexibility.html

Get the list of Lambda syntax and operators:

https://productforums.google.com/forum/#!topic/blogger/l3phi8bscGY
Shared publiclyView activity
Related Collections