data: Data Output Tag - Blogger Tags References

Data Output Tag - Blogger Tags References
The Data output tag or <data:...> is one of the tags in blogger tags references that are used to extract values from blogger blog data.

It is one of the most common tag that is used all around blogger XML code. It is the global tag that can be used anywhere in complete XML code for blogger.

Characteristics of data output tag:

Main characteristics of the data output tag listed under.
  • It cannot be nested
  • This tag does not support any attribute
  • A tag Data Output Tag does not accept data from tables that are extracted by their index.

Syntax of Data Output Tag:

The syntax for data output tag is:
<data:DATA_NAME/>
DATA_NAME in the above code is the name of the data that we want to extract.

Data Output Tag Syntax Composition:

Depending on the dictionary from which the data is extracted and depending on the type of data, the composition of the syntax may differ.

Simple Item:

<data:itemName/>

An Object:

<data:objectName.itemName/>

Multiple Nested Objects:

<data:objectName1.objectName2.itemName/>
  • itemName is the name of the item that we want to to extract.
  • objectName is the name of object to extract.
  • objectName1 is the name of first object.
  • objectName2 is the name of second object.

Example Usage:

These are some examples of using Data Output Tag or <data:...>.

Extract Simple Item:

<data:title/>
Extraction of item title. It will return the title of blog.

An object of an item:

<data:view.title/>
It will return the name of item contained in the object view.

Multiple Objects:

<data:view.title.size/>
It will return the size of item contained in the object view.

An Object Array:

<b:loop values=data:posts' var='post'>

  <data:post.title/>

</b:loop>
It will return the posts in the array and then fetches their item name ( title ) one by one a loop.

Conclusion:

That's all about Data Output Tag. As I have told you it is a global tag used all around the blogger template editor.

Post a Comment

Was this article useful? Please Leave Your Feedback by writing what's in your mind, below.

Recent Comments

{getWidget} $results={3} $label={comments} $type={list}