Syntaxes and Attribute
Blogger XML Language
<b:if cond='EXPRESSION'> <!-- executed if a specified condition is true --> <b:elseif cond='EXPRESSION2'/> <!-- executed if upper condition test is false --> <b:else/> <!-- executed if all condition is false --> </b:if>
Conditional Tags Example
With a Blogger data Expression
<b:if cond='data:view.isHomepage'> <!-- Execute --> </b:if>
With a Boolean data
<b:if cond='data:blog.pageTitle'> <b:if cond='false'> <!-- Execute --> </b:if> </b:if>
With a comparison operator
<b:if cond='data:blog.isMobile == "true"'> <!-- Execute --> </b:if>
With a logical operator
<b:if cond='!data:view.isMobile and data:view.isHomepage or data:view.isSearch'> <!-- Execute --> </b:if>
With a membership operator
<b:if cond='data:view.search.label in ["Foo", "Bar", "Baz"]'> <!-- span Block 1 --> <b:elseif cond='data:view.search.label not in ["Baz", "Qux"]'/> <!-- span Block 2 --> <b:else/> </b:if>
With a lambda operator
<b:if cond='data:posts any (p => p.labels any (l => l.name == "Foo"))'> <!-- Execute --> </b:if>
Other Tag
- <b:attr>
- <b:case>
- <b:class>
- <b:comment>
- <b:default>
- <b:defaultmarkup>
- <b:defaultmarkups>
- <b:eval>
- <b:else>
- <b:elseif>
- <b:if>
- <b:include>
- <b:includable>
- <b:loop>
- <b:message>
- <b:param>
- <b:section>
- <b:skin>
- <b:switch>
- <b:tag>
- <b:template-script>
- <b:template-skin>
- <b:widget>
- <b:widget-setting>
- <b:widget-settings>
- <b:with>
- <![CDATA[]]>
- <data:.../>