There are four main types of page which we can differentiate in blogger XML. Below are the list and the XML code snippet to differentiate them.
1. Archive
Archive page type refers to the pages added by Blog Archive Widget, it normally has “_archive.html” ending in its URL.
- <b:if cond='data:blog.pageType == "archive"'>
- <title>
- Posts Archive | <data:blog.title/>
- </title>
- </b:if>
2. Index
Index page type refers to pages like homepage and search result page. Page with a list of posts are normally an Index page.
- <b:if cond='data:blog.pageType == "index"'>
- </b:if>
3. Item
Item page refers to our blog post – content created using blog post button.
- <b:if cond='data:blog.pageType == "item"'>
- <title>
- <data:blog.pageName/> | <data:blog.title/>
- </title>
- </b:if>
4. Static Page
Static Page refers to our blog page – content created using page post button.
- <b:if cond='data:blog.pageType == "static_page"'>
- <title>
- <data:blog.pageName/> | <data:blog.title/>
- </title>
- </b:if>
With the blogger if condition, we can use the code snippets above to insert custom title tag for our blogspot. Thanks. Happy blogging.