Blogger Conditional Tags: Make your Blog Dynamic

The XHTML of the Blogger blog lets us edit the Template and make it Dynamic. We have already seen the different pagetypes that blogger has and the various conditional tags that could be used with it accordingly in those pages in this post - 7 Blogger Pagetypes: The Most Used Conditional Tags.

We'll now check out some additional conditional tags.

1. Waiting to implement a functionality only in the Homepage?
<b:if cond='data:blog.url == data:blog.homepageUrl'>

2. Want to add buttons only in the Post pages & Static pages?
<b:if cond='data:blog.url == data:post.url'>
<!--Post and Static Pages->

3. Ready to do specific change only in one specific post/page?
<b:if cond='data:blog.url == "URL"'>
<!--Specific Page-->

4. Wish to have a job done in all-pages except post-listing-pages?
<b:if cond='data:blog.pageType != &quot;index&quot;'>
  <!-- all pages NOT index pages -->

5. Do you have any multi-conditional function to do?
    No problem. Blogger has its own special <b:if> and <b:else/> tags.
<b:if cond='CONDITION-CODE-1'>
<b:elseif cond='CONDITION-CODE-2'/>

6. Would you like to perform AND/OR operations anywhere?
    Solution is here. Blogger makes use of AND/OR operators in the conditional tags.
<b: if  cond='CONDITION-CODE-1 && CONDITION-CODE-2'>
</b: if >
<b: if  cond='CONDITION-CODE-1 || CONDITION-CODE-2'>
</b: if >