In this article, I would like to explain about two tags in blogger XML which have function to control viewing content in your blogger page. Blogger Blog actually have 3 (three) pages: 1. homepage, 2. single page or article page, and label/category page.
The tags that I would explain is for displaying section or alike in homepage only. But, the section are not going to appear in single page. I usually call this with the term "
POST-FOCUS" or "
YOU CAN SEE ME IN FRONT, BUT NOT IN BEHIND". Yes, the visitors can see the section that covered only in homepage, but they can not see it again in single pages.
POST-FOCUS mean that the blog writer help his/her visitors to get focus on reading his/her articles. In any condition, sometime, a reader do not want to see any featured template such as IMAGE SLIDER, CONTENT GLIDER, OR MOOTOOLS (Flash). The reader said, the slider or glider make them confuse because they need to focus on the article. Also, in many cases, that featured template takes much time to load in single page. So, it will better when the featured template is appeared in homepage only.
If there any suggestions about the name or theory about it, you could tell me guys.... :)
What is the code for POST-FOCUS:The codes have two models which have the same function and often shown in our default XML Templates.
first code is :
<b:if cond='data:blog.pageType != "item"'> <!-- Opening tags -->
SOME OF COVERED AREA
</b:if> <!-- Closing tags -->
In default blogger template, This code can be seen in comment link.
and the second is:
<b:if cond='data:blog.url == data:blog.homepageUrl'> <!-- Opening tags -->
SOME OF COVERED AREA
</b:if> <!-- Closing tags -->
Notice:
The second code can be seen in header section of default blogger template.
Please see, the word "some of covered area". The covered area is some content that you wanna show only in your blog homepage.
Yes, when those tags is implemented, the relating content which covered can only be seen in your blog homepage and label page, but the content will dissapear in your article or single page.
You could see the demo of it in futura, gamezine, or forex press.(
click here for demo) I set that tags to cover the glider and slider. So, the glider and slider will dissapear when other visitors go to article/single pages.
I think it is more than enough to know the description about it. What about the implementation?
How to implement this codes:
From my experience converting WP and making XML template, I observe and note there are four place that POST-FOCUS can be implemented. However, you could give me suggestion or add more explanation since it is just my theory. That four place is :
1. You can put Post Focus in blogger XML template section
for example :
<b:if cond='data:blog.pageType != "item"'> <!-- Opening tags -->
<b:section class='cahaya6' id='cahaya6' showaddelement='yes'>
<b:widget id='HTML3' locked='true' title='Recent Post' type='HTML'/>
</b:section>
</b:if> <!-- Closing tags -->
2. Do not put POST FOCUS code before or after widget section.
<b:widget id='Feed1' locked='false' title='Cahaya Biru's Sphere' type='Feed'>
</b:widget>
Example of wrong implementation:
<b:if cond='data:blog.pageType != "item"'> <!-- Opening tags -->
<b:widget id='Feed1' locked='false' title='Cahaya Biru's Sphere' type='Feed'>
SOME WIDGET CONTENT
</b:widget>
</b:if> <!-- Closing tags -->
3. You can put it inside the includable element. This implementation is common and well known. As it is using in read more trick. Yes, read more tricks use it.
4. You can put POST FOCUS after ]]></b:skin> or above </head>
Example cases:
You want to hide your Javascript Third Party because you do not need it anymore in single page.
HTML structure of the case:
]]></b:skin>
<b:if cond='data:blog.pageType != "item"'> <!-- Opening tags -->
<script src='http://HOSTING-SOMEWHERE/androidafx.js' type='text/javascript'/>
<script src='http://HOSTING-SOMEWHERE/androidaglide.js' type='text/javascript'/>
</b:if> <!-- Closing tags -->
</head>
I think that is enough for the explanation and description about "POST FOCUS" or "YOU CAN SEE ME IN FRONT, BUT NOT IN BEHIND". If you want to add more description and explanation, you could leave it in comments box below.
Have an nice try and blogging....