BlogTariff


Blogger blogs are basically built with XML language the whole template runs under XML with certain conditions.
Here you can display certain certain conditional tags of any other language, if,else can be added to control of widget look or template design.
BlogTariff lists out few blogger blog conditional tags for good appearance.
Conditional tags are named as below:-





  • For Home page
  • For Archive page
  • For Post page or Item page
  • For Static page
  • For Certain URL page
  • For specific Labels

To get good look appearance widget by using these above conditional tags, just replace the below code (Red color highlighted) with any of conditional tag.
<b:widget id='HTML1' locked='false' title='Testing Widget' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
</b:if>
<b:include name='quickedit'/>
</b:includable>
</b:widget>

1. For Home page

Way to use Condtional tag in any location of template or widget on Home page
<b:if cond='data:blog.url == data:blog.homepageUrl'>
This text will be displayed only on home page
</b:if>
Excluding Home page and every location to display the conditional tag is
<b:if cond='data:blog.url != data:blog.homepageUrl'>
This text will be displayed everywhere except on home page
</b:if>

2.For Archive Page

Way to use Condtional tags in any widget or few locations of template on Archive pages
<b:if cond='data:blog.pageType == &quot;archive&quot;'>
Text for Archive pages only
</b:if>
Display everywhere excluding arcive page condtional tag is
<b:if cond='data:blog.pageType != &quot;archive&quot;'>
Text for everywhere except Archive pages
</b:if>

3.Post page or Item page

HTML code to appear on Post/item page
<b:if cond='data:blog.pageType == &quot;item&quot;'>
Text for post pages only
</b:if>
Display everywhere excluding Post/Item page
<b:if cond='data:blog.pageType != &quot;item&quot;'>
Text for everywhere except item pages
</b:if>

4. For static page

HTML code to display on Static page
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
Text for static pages only
</b:if>
Display everywhere excluding Static page
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
Text for everywhere except static pages
</b:if>

5.Certain URL

HTML code to display on certain URL
<b:if cond='data:blog.url != &quot;http://www.blogtariff.com/p/chat.html&quot;'>
Text will display on above URL only
</b:if>

6.Specific Labels

Dislay content on specific labels/categories
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name == &quot;Testing Category&quot;'>
Text will be displayed only on Posts which have label Testing Category.
</b:if></b:loop>
You've facing any problem with the above conditional tag placing feel free to bring to us by commenting on this blog.
We always respects your words...

Post a Comment Gmail ID

Do not Try to Add Spam Comments

 
Top