Feb 10, 2013

How to Insert conditional Element on a Particular page type | VERY IMPORTANT FOR BLOGGER

Must read the bottom part of this post. These are very important for a blogger.
First we have to find this code:  <b:if cond='data:blog.url == data:blog.homepageUrl'>

TEMPLATE>BACK UP TEMPLATE>HTML>CLICK EXPAND WIDGET
Then do this.
CTRL+F
 Paste this in find text box of the browser .
<b:if cond='data:blog.url == data:blog.homepageUrl'>

The total code is look like this.

<b:if cond='data:blog.url == data:blog.homepageUrl'>
PUT THE CONDITION HERE
    <data:title/>
  <b:else/>
    <a expr:href='data:blog.homepageUrl'><data:title/></a>
  </b:if>
</b:includable>


THIS IS THE CONDITION. And add  <b:else/>  at the end of the condition.

<style>
.blog-pager, .footer, .post-footer, .feed-links, .ex, #Gadget1, #Stats1, #HTML8, #sidebar-left-1, #Followers1 { display:none !important;}.main-inner .columns {width: 60%;padding-left:0 !important;padding-right:0 !important;}
</style>
  <b:else/>
------------------
Different conditional code outer enclosures:
General enclosure for conditional style:
<b:if cond='PUT_CONDITION_HERE'>
</b:if>
--------------
<b:if cond='data:blog.url == data:blog.homepageUrl'>
</b:if>
---
<b:if cond='data:blog.pageType == "item"'>
</b:if>
----
TOTAL WIDGET NAME OF PAGE TYPE IN BLOGGER FOR CONDITIONAL CODING:

<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.pageType == "static_page"'>
<b:if cond='data:blog.pageType == "archive"'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:if cond='data:blog.url == "PUT_URL_HERE"'>
<b:if cond='data:blog.url == data:post.url'>
<b:if cond='data:blog.searchLabel'>
<b:if cond='data:post.isFirstPost'>
WE HAVE TO ATTACH </b:if> AS ENCLOSURE FOR ALL ABOVE WIDGET ADDITION.
These code can be also added nearest to its sister location. 
-------

For details see these pages:
http://www.spiceupyourblog.com/2010/02/blogger-gadgets-home-page-only-post.html
http://www.bloggersentral.com/2010/02/display-widget-on-specific-pages-in.html




No comments:

Post a Comment