Cheatsheet data:view
11:05 PM
Data View is indicating the current view of the Blog. Usually used with a conditional expression as in <b:if> tag because most of the type is boolean, that's mean the value is either 'True' or 'False'.
Expression | Type Data | Meaning |
---|---|---|
data:view.archive.day | number | Day of the current archive page. e.g. 17. |
data:view.archive.month | number | The month of the current archive page. e.g. 8 |
data:view.archive.year | number | Year of the current archive page. e.g. 1945 |
data:view.description | string | Description of the current pageview. |
data:view.featuredImage | image | Featured image for the current page or post. |
data:view.isArchive | boolean | Indicating Archive feed. |
data:view.isError | boolean | The current view is 404 or error page. |
data:view.isHomepage | boolean | The current view is Homepage. |
data:view.isLabelSearch | boolean | The current view is the Label page. |
data:view.isMultipleItems | boolean | A page view is contained multiple posts, eg, Search, Label, Homepage, etc. |
data:view.isMobile | boolean | A pageview has parameter m=1. |
data:view.isPage | boolean | is Showing a Blog Static Page. |
data:view.isPost | boolean | is Showing a Single Post. |
data:view.isPreview | boolean | In preview mode. |
data:view.isSearch | boolean | All page contain word 'search' in the URL. |
data:view.isSingleItem | boolean | is a Single item, wether is the single post or static page. |
data:view.pageId | number | The id of the static page. |
data:view.postId | number | The id of the post. |
data:view.search.label | string | Used for filtering label of the current view. |
data:view.search.query | string | Used for filtering search keyword. |
data:view.search.resultsMessage | string | The message about the search results being shown. |
data:view.search.resultsMessageHtml | string | A message about the result with HTML Link. |
data:view.title | string | Title of the current view. |
data:view.url | url | The URL of the current view. |