Views and Page Types in Blogger

Views and Page Types in Blogger

By M.Muzammil | February 03, 2023

Views and Page Types in Blogger

If you are a blogger user then you might have come up with the idea to style your website pages according to the page types. You searched everywhere and you haven't got any exact way to determine the page type of blogger blog.

Don't worry in this article I am going to tell you all about views and page types in blogger blogs. There are different page types in blogger that can be organized into different categories.

In WordPress, you have multiple plugins to do so but in blogger, you don't have any solution for this other than determining the page types.

Page types in blogger are inside the data object and you can find the page type by data:blog.pageType, it will return the page type of blogger blog and data:view.type will return the view type of blogger blog.

Below is the list of page types that are used in blogger and the return value of data:blog.pageType & data:view.type.

Page types in blogger:

data:view.isHomepageSpecifies the homepage of blogger blog.
data:view.isPostSpecifies the posts or articles pages, posts that you publish.
data:view.isPageSpecifies the pages in blogger, not posts.
data:view.isErrorSpecifies the error page.
data:view.isArchiveSpecifies the archive page of your blogger blog where all the posts of your blog are listed.
data:view.isLabelSearchSpecifies whether the page is search by label or not.
data:view.isMultipleItemsThis specifies the multiple item pages in blogger like search pages, archive pages, homepage, and all the other pages other than posts and pages in blogger.
data:view.isSingleItemDetermines whether the page is a single item page like post page or page.
data:view.isMobileSpecifies whether the client device is mobile or not.
data:view.isPreviewDetermines if your website is in preview mode especially when you are writing an article and previewing it before publishing.
data:view.isLayoutModeDetermine the layout mode of your blogger blog. Layout mode is the mode of your blogger dashboard where you can add or remove widgets.
keep one thing in mind the value of all the above commands will be boolean ( true or false ) which means that you can use all of them as conditions.

All the above commands are universal which means that they can be used anywhere inside your blogger's XML code.

Example usage of all the above commands:

This is the example code that specifies how you can use the above commands in blogger XML code and take all of them into action. You can use all of the above commands as a condition and now it's up to you whether you use that with b:if, b:eval, or a tag itself.

<!-- Usage with b:eval -->
<b:eval expr='data:view.isHomepage'/>

<!-- Usage with b:if -->
<b:if cond='data:view.isHomepage'> <!-- Code to be executed --> </b:if>

<!-- Usage by the tag itself -->

Wind Up:

A list of all the commands that can be used to determine the page types and views of a blogger blog is listed above.

You can use any of the commands in your blogger XML code globally at any place and get the result but keep one thing in mind the result will be a Boolean value.

I hope that you will feel this article is informative and if you want anything else, comment it down I will be very much excited to answer it.

Related Posts


I am Muzammil, a Self-taught Web Designer & Developer. I haven't yet completed my college degree. Started learning programming at the age of 12 and still learning. I love to work in Javascript and make eye-catchy designs. Free for your calls :)



sir, can you write a article about how to install dropdown mega menu on blogger

M.Muzammil Author

Ok, Wait for a while and article will be shared soon!