Pages

How to Display Widget on Particular Blogspot Pages

Monday, December 16, 2013

If you want to display a widget on a particular page of your blogspot blog, you can use
"<b:if cond=’ ‘>…..</b:if>" tag. Before discussing selective display we should know different types of blogspot pages.

1. Home Page: your blogs home page
2. Archive Page: Refers to archive pages
3. Item Page: Refers to Post Pages
4. Index Page:  Includes home page + label page + search results page
5. Static Page: Refers to static pages of your blog


1. Display on your home page only: You might like to display a welcome message on the home page only

     <b:if cond='data:blog.url == data:blog.homepageUrl'> 
     Hi to all welcome to How Now
     </b:if>  


2. Displaying on all pages other than the Homepage: This condition will show your message or widget on all pages other than your blog's homepage.

 <b:if cond='data:blog.url != data:blog.homepageUrl'> 
 Seen to all pages but not for Homepage 
 </b:if>  

3. Displaying something on the Archive Pages: 

 <b:if cond='data:blog.pageType == &quot;archive&quot;'> 
 Hello this is only on Archive page 
 </b:if>  

4. Displaying something on non Archive Pages:

     <b:if cond='data:blog.pageType != &quot;archive&quot;'> 
     For non archive only 
     </b:if>  

5. Displaying something on post page only: 

     <b:if cond='data:blog.pageType == &quot;item&quot;'> 
     Post page seen only 
     </b:if>  

6. Displaying something on non post page only: 

     <b:if cond='data:blog.pageType != &quot;item&quot;'> 
     This is a non post page 
     </b:if>  

7. Displaying something on static  pages only:

     <b:if cond='data:blog.pageType == &quot;static_page&quot;'> 
     Hi this is a static page 
     </b:if>  

8. Displaying something on  all other than static page:

 <b:if cond='data:blog.pageType != &quot;static_page&quot;'> 
 Hi this is not a static page 
 </b:if>  

9. Displaying something on a particular url only:

     <b:if cond='data:blog.url == &quot;The_Selected_Page_Url&quot;'> 
     This will be displayed on The_Selected_Page_Url only 
     </b:if>  

(Replace "The_Selected_Page_Url" with the url where you want the widget to be displayed)

10. Displaying something on all pages other than a particular ur: 

 <b:if cond='data:blog.url != &quot;The_Selected_Page_Url&quot;'> 
 This will not be displayed on The_Selected_Page_Url 
 </b:if> 

(Replace "The_Selected_Page_Url" with the url where you don't want the widget to be displayed)

11. Display something on the homepage and something else on all other pages:

 <b:if cond='data:blog.url == data:blog.homepageUrl'> 
 This is the homepage 
 line1 
 line2 
 <b:else/> 
 This is not the homepage 
 line 3 
 line4 
 </b:if>  

No comments:

Post a Comment

 

Most Reading