Latest news, food, business, travel, sport, Tips and Tricks...

Blogger data Attribute

Data is an attribute to define dataset to be forwarded to the child node. The value of this attribute can be expression or an object.

Blogger Attribute [data] Syntax

EXPRESSION

data='alias'

OBJECT WITH EXPRESSION

data='{ alias: 'EXPRESSION' }'

OBJECT WITH STRING DATASET

data='{ alias: ["STRING1",[STRING2"] }'

  • This attribute found in tag <b:include> and forwarded to <b:includable>.
  • alias is the data name to be forwarded to child. If the name is 'alias' so in the child it will be processed to data:alias.
  • Used multiple alias must be separated by comma.

Examples Writing data attribute

Take from parent and forward to child

<b:include data='post' name='foo'/>

Forward data set to child

<b:include data='{ post: data:foo }' name='bar'/>

Single data string

<b:include data='{ foo: "bar" }' name='item'/>

Multiple data string

<b:include data='{ foo: ["Qux","Quux"] }' name='list'/>

,
//