data:view là thẻ phần tử trỏ về view hiện tại của Blog. Thường được sử dụng với biểu thức có điều kiện như trong thẻ <b:if> vì hầu hết các loại là boolean, điều đó có nghĩa là giá trị là “True” hoặc “Sai”. Thẻ phần tử data:view bao gồm các thuộc tính dưới đây:
view.archive | object | Fields relating to the archive for the current view. |
view.description | string | Description of the current view. |
view.featuredImage | image | Featured image for the current view. |
view.isArchive | boolean | Whether the current view is an Archive feed. |
view.isError | boolean | True if the current view is an error page. |
view.isHomepage | boolean | True if the current view is the homepage of the blog. |
view.isLayoutMode | boolean | True if the view is the Layout mode for rearranging widgets in the template. |
view.isMultipleItems | boolean | True if the current view has multiple posts, e.g. the homepage or a search page. |
view.isPage | boolean | True if the current view is for a single page item. |
view.isPage | boolean | True if the current view is a page item. |
view.isPost | boolean | True if the current view is for a single post. |
view.isPost | boolean | True if the current view is a post page. |
view.isPreview | boolean | Whether the current view is a preview. |
view.isPreview | boolean | True if the current view is a preview. |
view.isSearch | boolean | True if the current view is for a query or label filter search. |
view.isSingleItem | boolean | True if the current view is a single post or page. |
view.pageId | number | Id of the page in the current view, if the view is a page item. |
view.postId | number | Id of the post for the current view, if the current view is a post. |
view.search | object | Data related to the search parameters of the current view. |
view.title | string | Title of the current view. |
view.type | string | Type of the current view, either "item" or "feed". |
view.url | url | The url of the current view. |
view.archive.day | number | Day of the current archive feed view, e.g. 15. |
view.archive.month | number | Month of the current archive feed view, e.g. 4 |
view.archive.rangeMessage | string | Message describing the current archive view’s date range. |
view.archive.year | number | Year of the current archive view, e.g. 2016 |
view.search.label | string | Label filter for the current view’s search. |
view.search.query | string | Query filter for the current view’s search. |
view.search.resultsMessage | string | Localized message about the search results being shown. |
view.search.resultsMessageHtml | string | HTML version of resultsMessage. |