Maybe you already know about index, homepage, item page, maybe you think there are not another ways about conditional tag, but i create an experiment in my dummy blog with conditional tag and i found many other of conditional tag. So the formula is easy
<b:if cond='data:blog.pageType == "index"'>The green color is a general code of conditional tag.
The blue code is a layout data tag. And the dark blue is the data of the blue tag. The explaination is --if the blog page type is index, (content of that if)--
So we can modify by logic with this explaination, we can replace the data:blog.pageType with data:post.author and then replace the index with the author name or example Damar Zaky. So the explaination is changed to --if the post author name is Damar Zaky, (content of that if)--. Then the code is maybe like this:
<b:if cond='data:post.author == "Damar Zaky"'> <style> CSS code </style> </b:if>
Page type conditional
This is the list for conditional page typeIndex page
, homepage, search page<b:if cond='data:blog.pageType == "index"'>
Item page
, a post page<b:if cond='data:blog.pageType == "item"'>
Static page
, for the static page or http://yourblog.blogspot.com/p/static.html<b:if cond='data:blog.pageType == "static_page"'>
Archive page
, for archive page page like http://damzaky.blogspot.com/2012_10_01_archive.html<b:if cond='data:blog.pageType == "archive"'>
Home page
, your home page<b:if cond='data:blog.url == data:blog.homepageUrl'>
Specific URL
, a specific url<b:if cond='data:blog.url == "PUT YOUR URL HERE"'>
Post and static page
, post and static<b:if cond='data:blog.pageType == "data:post.url"'>
Error or 404 page
, error or 404 page<b:if cond='data:blog.pageType == "error_page"'>
Mobile page
, not a page but for mobile conditional tag, if CSS put .mobile .class<b:if cond='data:blog.isMobile'>
Search label page
, search label page or label page like: http://damzaky.blogspot.com/search/label<b:if cond='data:blog.pageType == data:blog.searchLabel'>
Search with query
, search label page or label page like: http://damzaky.blogspot.com/search?q=<b:if cond='data:blog.pageType == data:blog.searchQuery'>
Search with query with specific query
, search page with keyword like: http://damzaky.blogspot.com/search?q=css<b:if cond='data:blog.searchQuery == "The search keyword"'>
Search label with specific label
, search page with keyword like: http://damzaky.blogspot.com/search/label/NAME OF LABEL<b:if cond='data:blog.searchLabel == "NAME OF LABEL"'>
Explaination
if you want to make except conditional change the == with != . Then this is special and unique tag, if you doesn't understand about layout data tag, you can see in this post http://damzaky.blogspot.com/2012/10/the-blogger-layout-data-tag-master-code_12.html. Then the special is like this, if you use data:post.author == name, you need to put that code in the blog post widget, why?, if you put that code in head, it will not working because data:post.author the red code meaning where the data dictionnary is placed, it means that word/code is placed in post widget, so if you want to put that code, you must put that code in below the <b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'> code.But how to use data:post.author?, this code will be used by a blog who haves author more than one. So the code like this maybe, different author not only marked with text but now we can change it with different author picture, like this:
<b:if cond='data:post.author == "Damar Zaky"'> <img src='photo of author is photo of damar zaky'/> <style> .post { background-color: #94eaff; } </style> <b:if> <b:if cond='data:post.author == "Ykaz Ramad"'> <img src='photo of author is photo of ykaz ramad'/> <style> .post { background-color: #e9ffb5; } </style> <b:if>
If you want different label, different style, you can use this code:
<b:loop values='data:post.labels' var='label'> <b:if cond='data:label.name == "NAME OF LABEL"'> <style> .post { background-color: #f7e3ff; } </style> </b:if> </b:loop>But be careful with the label, because it's very sensitive, if the label name is Blogger and if you change the NAME OF LABEL with blogger, it will not working, you must change with Blogger.