photo
, say in the context of a profile widget, may have components such as url
, height
, and width
. Using the "." notation indicates that we want the URL for this photo, rather than a URL from something else. There is a great deal of data that you can access with the data:
tag, and it varies depending on which widget you're working with. We've got a comprehensive list to help you find the data you need. Loops
Theb:loop
tag lets you repeat a section of content multiple times. This is most commonly used for printing out each post in a list of posts for a given page, or each comment, or each label, etc. The general format for using loops is this: <b:loop var='identifier' values='set-of-data'>
[repeated content goes here]
</b:loop>
The 'identifier' part can be any name you choose, and will be used to stand in for each new item in the list, each time through the loop. A common convention is to simply call this "i". The set of data you specify for the values can be any piece of data described in the data tags article as being a list of items. For instance, in the blog posts widget,
posts
is a list. Code like the following will loop through each post, printing out the title for each one, with header tags around it.