Tag data b:message and b:param on blogger

The tags <b:message> used for getting explicit message data which value stored at the server side of Blogger, while <b:param/> is additional parameter belong to <b:message>. Rendered message in HTML is vary based on Blog Language Settings.

Tag data b:message and b:param on blogger 


The Syntax And Attribute

BLOGGER XML LANGUAGE

<b:message name='data:alias'>
    <b:param expr:value='data:[STRING]'/>
    <b:param value='STRING'/>
</b:message>
  • Tags <b:message> name value is an alias of data:.
  • Tags <b:message> Only accept data:messages type.
  • Tags <b:param/> is singleton.
  • Tags <b:param/> can be working only if tag <b:message> have parameter.
  • Tags <b:param/> value can be data:[STRING] or String.

Examples and Implementation

DATA MESSAGES THAT HAS NO PARAMETERS.

<b:message name='messages.by'/>
messages.by origin is <data:message.by/>, This type of message has no
parameter, so we can't give any <b:param/>.

A MESSAGE WITH A PARAMETER

<b:message name='messages.byAuthor'>
    <b:param expr:value='data:post.author.name'/>
</b:message>
<b:param/> take data string <data:post.author.name/> which is
who posted the post. For who set Blog language to English, the result will
be By AuthorName.

CUSTOMIZE MESSAGE THAT HAS PARAMETER

<b:message name='messages.byAuthorLink'>
    <b:param value='foo'/>
    <b:param value='https://example.blogspot.com'/>
</b:message>

This type of message has two parameters, we can customize it like above. The first <b:param/> is the name and the second one is the link of the author. The result will be 'By Foo' with given link.

Other Tag

Post a Comment

Previous Post Next Post