Conditional tags syntax
Update on 26-5-2013
<b:if cond='PUT_CONDITION_HERE'> </b:if>
cond
attribute. Each (opening) <b:if>
tag need to be closed with a closing </b:if>
tag.Below is List of Conditional Tags
</b:if>
tag when applying a conditional in your template.1. Index (list) pages
Index pages include homepage, labels page and yearly archive page.
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
3. Post (item) Page Only
<b:if cond='data:blog.pageType == "item"'>
4. First Post
This is not a page, but a conditional for the first post.
<b:if cond='data:post.isFirstPost'>
5. Static Page
<b:if cond='data:blog.pageType == "static_page"'>
6. Archive Pages
<b:if cond='data:blog.pageType == "archive"'>
7. Specific Page/URL
<b:if cond='data:blog.url == "PUT_URL_HERE"'>
8. Post and Static Page
<b:if cond='data:blog.url == data:post.url'>
9. Label-Search Pages
<b:if cond='data:blog.searchLabel'>
How to apply Conditional Tags
To apply a conditional tag to a content, simply put the content between the opening <b:if cond……> and the closing </b:if>, like Below code.
<b:if cond='data:blog.pageType == "item"'> Here is Your CONTENT </b:if>
in the example above, the content or widget show only on post pages.. I am writing a few more examples as soon as time Allow.
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by the author.
DeleteThis comment has been removed by a blog administrator.
ReplyDelete