All Blogger Conditional Tags - Page type Conditional tags
Published by Aslam
1Home Page Only
2Everywhere Except Homepage
3Archive Page Only
4Everywhere except archive page
5Item Page or Post Page Only
6Everywhere except item page
7Static Page Only
8Everywhere except static page
9Specific URL Page Only
10Certain Labels Only
1 Home Page Only
To display a text message only on home page we use<b:if cond='data:blog.url == data:blog.homepageUrl'>
<p> This text will be displayed only on home page</p>
</b:if>
2 Everywhere except homepage we use
<b:if cond='data:blog.url != data:blog.homepageUrl'>
<p>This text will be displayed everywhere except on home page</p>
</b:if>
<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 != ""'>
<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>
3 Archive Page Only
<b:if cond='data:blog.pageType == "archive"'>
<p>Text for Archive pages only</p>
</b:if>
4 Everywhere except archive page
<b:if cond='data:blog.pageType != "archive"'>
<p>Text for everywhere except Archive pages</p>
</b:if>
5 Item/Post Page Only
<b:if cond='data:blog.pageType == "item"'>
<p>Text for post pages only</p>
</b:if>
6 Everywhere except item page
<b:if cond='data:blog.pageType != "item"'>
<p>Text for everywhere except item pages</p>
</b:if>
7 Static Page Only
<b:if cond='data:blog.pageType == "static_page"'>
<p>Text for static pages only</p>
</b:if>
8 Everywhere except static page
<b:if cond='data:blog.pageType != "static_page"'>
<p>Text for everywhere except static pages</p>
</b:if>
9 Specific URL Only
<b:if cond='data:blog.url == "http://aslamise.blogspot.in/2012/12/all-blogger-conditional-tags.html"'>
<p>Text will display on above URL only</p>
</b:if>
10 Certain Labels Only
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name == "Testing Category"'>
Text will be displayed only on Posts which have label Testing Category. </b:if>
</b:loop>