The expression evaluation tag <b:eval> is a tag for evaluating the value of an expression. <b:eval> tags can combine or modify data values using an expression then print its value.
<b:eval> Syntax and Attribute
BLOGGER XML LANGUAGE
<b:eval expr='EXPRESSION'/>
The evaluation tag has only one attribute, which is expr:
<b:eval> Example
A CONCATENATE OPERATION
<button class='subscribe-button pill-button'>
<b:eval expr='data:messages.subscribe + " to " + data:blog.title'/>
</button>
Result will be "Subscribe to BlogTitle"
A TERNARY OPERATION
<b:eval expr='data:view.isHomepage ? data:blog.pageName : data:blog.pageTitle'/>
The result of the expression is one of two defined values.
- If Homepage: "data:blog.pageName
- Else: data:blog.pageTitle
CREATING POST SUMMARY
<b:eval expr='data:post.body snippet {length: 250, links: false, linebreaks: false}'/>
Other Tag
- <b:attr>
- <b:case>
- <b:class>
- <b:comment>
- <b:default>
- <b:defaultmarkup>
- <b:defaultmarkups>
- <b:else>
- <b:include>
- <b:loop>
- <b:message>
- <b:section>
- <b:skin>
- <b:switch>
- <b:tag>
- <b:template-script>
- <b:template-skin>
- <b:widget>
- <b:widget-setting>
- <b:with>
- <![CDATA[]]>
- <data:.../>
Blogger , Tips and Tricks