<b:with> Syntax and Attribute
Blogger XML Language
<b:with value='EXPRESSION' var='STRING'> </b:with>
<b:with> Examples
With String
<b:with value='"Type Food"' var='type'> <b:with value='["Meat","Fruit","Vegetable"]' var='Food'> <data:type/> <ul> <b:loop values='data:Food' var='loop'> <li><data:loop/></li> </b:loop> </ul> </b:with> </b:with>
Creating Data Object
<b:with value='{ Name: "Foo", Gender: "Male" }' var='OBJ1'> <b:with value='{ Name: "Bar", Gender: "Female" }' var='OBJ2'> <b:with value='{ foo: data:OBJ1, bar: data:OBJ2, baz: "unknown" }' var='OBJECT'> <ol> <li>Name: <data:OBJECT.foo.Name/> | Gender: <data:OBJECT.foo.Gender/></li> <li>Name: <data:OBJECT.bar.Name/> | Gender: <data:OBJECT.bar.Gender/></li> <li>Name: <data:OBJECT.baz/></li> </ol> </b:with> </b:with> </b:with>
Resize an image
<b:with value='data:post.featuredImage.isResizable ? resizeImage(data:post.featuredImage, 72, "1:1") : data:post.thumbnail' var='image'> <img alt='' border='0' expr:src='data:image'/> </b:with>
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:.../>