Before getting into the details of selective display,let us discuss about the different types of pages on blogger.
1) home page- yea its your blogs home page as the name suggests(actually this is not a type. but i will still include it here..)
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 – The newly introduced Blogger Pages
Selective Display..
There are different conditions to check the page type. You can use these conditions for the selective display.
You might like to display a welcome message on the home page only..
Displaying on all pages other than the homepage
Displaying something on the Archive Pages..
Displaying something on non Archive Pages..
Displaying something on post page only
Displaying something on non post page only
Displaying something on static pages only
Displaying something on all other than static pages
You can use the conditional thing for the index type pages. But i don't find much use in that.
Now displaying something on a particular url only (may be a particular post page only or something like that)
Now displaying something on all pages other than a particular url
Now how to use two conditions (or more).. the logical AND thing.. :)
the else thing..
What if you need to display something on the homepage and something else on all other pages.. here comes the use of if else
Different combinations are possible..
Limitations
1) I don't see a way to use OR conditions
2) There isn't any direct easy way to include AND in conditional statements
3) The main drawback is that we cant enclose an entire widget within the b:if tag.. you will get some message telling that a b:section cant have b:if s ie you can wrap an unexpanded widget within a b:if condition
Wrapping a widget with the conditional tags
Every widget other than the BlogPost Widget has this general structure
Wrapping conditional tags can be done as
this code will display the widget on The_Particular_Page_Url only (you have to provide this url)
Another Limitation..
wrapping the blogpost widget is little complicated as it has many b:includables.. yea you can do that too.. :)
0 comments :
Post a Comment