Description: A string of the current page type.
`_b.pageType` contains a string of the page type the user is currently on. The value of `_b.pageType` can also be predefined using the `_b.defaults()` method.
-
added:0.9.0
A string ("index", "item", "labels", "search") representing the page type.
String values
- If `_b.pageType = "index"`, the page type the user is currently on is the "homepage".
- If `_b.pageType = "item"`, the page type the user is currently on is a page or a post page.
- If `_b.pageType = "labels"`, the page type the user is currently on is a labels search page.
- If `_b.pageType = "search"`, the page type the user is currently on is a blog search results page.
simple usage of the `_b.pageType`
In the example below when `alertpageType()` is called there will be an alert of the current page type string
[html]
<script type='text/javascript'>
function alertpageType(){
alert(_b.pageType);
}
</script>
[/html]
DEMO:
Predefining `_b.pageType`
The code is an example of how the page type is predefined.
[html]
<script type='text/javascript'>
window.onload=function(){
_b.defaults({
pageType:"item"
});
}
</script>
[/html]