Skip to main content

How to check Page Types in blogger templates for customizing blog pages

Blogger users come across situations like customising their Blog templates for adding various plugins or custom changes. So for doing this, they should be aware of various page types and how to identify that using blogger specific conditional statements.

various types of blogspot pages are Item, Statis, Index, Archive, Search Label etc

to get the page type you have to use the parameter "data:blog.pageType"


How to check an Archive type Page?

Here the "data:blog.pageType" will be "archive"

do it like this:

<b:if cond='data:blog.pageType == "archive"'>
<!--Archive Page-->
</b:if>

How to check index page?

Search page, label page and home page of the blog comes under "index" type

So here is how it is checked:

<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--Search Page-->
</b:if>
<b:if cond='data:blog.searchLabel'>
<!--Label Page-->
</b:if>
<b:if cond='data:blog.searchQuery == ""'>
<b:if cond='data:blog.searchLabel == ""'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!--Homepage-->
<b:else/>
<!--Index Page-->
</b:if>
</b:if>
</b:if>
</b:if>



How to Check the Item page?

Item page means the detailed posting page. This is the page that you view after clicking on a "Continue reading" or "read more" link on home/label/search page

Item page is check like this:

<b:if cond='data:blog.pageType == "item"'>
<!--Item Page-->
</b:if>


How to check a static type Page?
Static pages are stand alone pages, like sitemap, contact us page etc you can check it using follow statement

<b:if cond='data:blog.pageType == "static_page"'>
<!--Static Page-->
</b:if>


Consolidated Page type checking code for blogger templates
Given below is the Consolidated Page type checking code

<b:if cond='data:blog.pageType == "archive"'>
<!--Archive Page-->
</b:if>
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--Search Page-->
</b:if>
<b:if cond='data:blog.searchLabel'>
<!--Label Page-->
</b:if>
<b:if cond='data:blog.searchQuery == ""'>
<b:if cond='data:blog.searchLabel == ""'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!--Homepage-->
<b:else/>
<!--Index Page-->
</b:if>
</b:if>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<!--Item Page-->
</b:if>
<b:if cond='data:blog.pageType == "static_page"'>
<!--Static Page-->
</b:if>


Above given steps will be helpful for those why try to implement changes in templates, like adding Adsense codes seperately in various pages and lots more funny things :)

Hope this helps:)

Comments

Popular posts from this blog

How to apply for a new ration card and what are the documents required?

List of documents required for new ration card application in Kerala and how to apply


Application for a new ration card should be addressed to Taluk Supply Officer (TSO) / City Rationing Officer (CRO) of applicant's residing area.

Primary document required are Residence certificate, Income certificate and incase the applicant's name is in another ration card then he/she should submit the reduction certificate ontained from previous TSO / CRO as proof for removing his/her name from old Ration card.

You can get the new application from your currently residing Taluk Supply Office.

Payback Points - How to redeem - How to merge multiple payback accounts - Block Payback card - Payback customer care

Joomla and Forum Integration - Integrating Forums to Joomla

Joomla is one of the most popular CMS opensource packages. It is very easier to develop website's using Joomla. You just need to download Joomla package from Joomla's Official website www.joomla.org  and install it on your domain and later adding customizations to templates and feature and Your website is ready :). Now a days most websites provides a forum section for it users for discussing various article topics, gathering opinions etc.



Following are some best know forum opensource packages which can be integrated with Joomla and create a new forum experience for users


Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »
Member
Search This Blog