b:comment Tag - Blogger Tags References

b:comment Tag - Blogger Tags References
The <b:comment> tag is an instruction tag that allows you to add a comment in the XML code of the Blogger theme. Make no mistake! This tag is a real Swiss Army Knife for experienced developers and hobbyists who want to learn the XML language of Blogger.

Syntax:

<b:comment>

 YOUR COMMENT HERE

<b:comment>

Characteristics:

  • The <b:comment> tag works in all of the XML, except in the tag <b:skin>.
  • Several <b:comment> tags can be combined.
  • <b:comment> tag cannot nest.

Attributes used:

At first glance, this tag can make you smile, but it is very useful because, not only does it allow you to add comments, but in addition, it executes the Blogger expressions that are in the comment.

And since that was not enough, we can also add attributes that are listed under.
AttributesClassificationPrefix "expr:"Meaning-
renderHTML classicauthorizedDisplay the comment in the HTML rendering. The expected value is true or false. Accompanied by the prefix expr:, the value may be:
  • type data boolean
  • a Blogger expression whose result is of type boolean
Optional
If attribute render is set to true the comment will be rendered and shown in HTML code otherwise it will only be shown in the blogger XML editor.

Example Usage:

These are some examples of using b:comment tag.

Comment with HTML Render:

<b:comment render='true'>
  This is a comment which will also be rendered in HTML Code.
</b:comment>

HTML Render:

<!--This is a comment which will also be rendered in HTML Code.-->

Comment with Expression:

<b:comment render='true'>
  <b:eval expr='data:post.hasJumpLink ? "This Page contains Jump Break or Read More Section." : "This Page does not contain Jump Break or Read More Section."'>
</b:comment>

HTML Render:

After evaluating the expression the result will be seen. If the page contains Jump Break or Read More Section the HTML Render will be as under:
<!--This Page contains Jump Break or Read More Section.-->
If the page does not contain Jump Break or Read More Section the HTML render will be like this:
<!--This Page does not contain Jump Break or Read More Section.-->

5 Comments

Was this article useful? Please Leave Your Feedback by writing what's in your mind, below.
  1. how to put timeago plugin in blogger can you make a tutorial?

    ReplyDelete
    Replies
    1. The Next Article will be about it Ok!

      Delete
    2. OK I'm waiting thanks you very much i like your blog.

      Delete
  2. I was looking for blogger tags for quiet long time because there is no official source it would not be easy to understand. Your blog is not less than sack of gold for me. Thank you!

    ReplyDelete
    Replies
    1. Thanks for your feedback and more blogger dogs will be published soon so subscribing to the newsletters will be very beneficial for you.

      Delete

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}