Data Tokens used in twig files - MizzouCreative/mizzoumvc GitHub Wiki

Brief description of the data tokens used in the twig files. "wp" means WordPress.

Site - contains Site-level data. See this documentation for a list of public properties that are set. Can also contain theme-specific settings (e.g. Search).

Posts - contains an array of MizzouPost objects. Similar to wp's get_posts(), or WP_Query->posts.

Post - instance of MizzouPost that contains all the data related to a post.

HeadTitle - contains the complete string to be used in the the title element of a page. Autodetermined by the framework.

wpHead - contains the output from wp's wp_head().

wpFooter - contains the output from wp's wp_footer().

PageTitle - string that should be placed into the main h1 element on the page. Usually autodetermined by the framework but can be overridden.

MainPost - an instance of MizzouPost for the main post object of a "page". Similar to wp's global $post or return from get_post()

Breadcrumbs - autogenerated list of ancestor objects from the current request, where each object contains the ancestor name and URL.

IncludeNoIndex - whether or not to set the noindex meta attribute on a page. Can be set on an individual post/page basis and autoset for search pages and 404's.

ActiveStyleSheetURL - URL to the "active" stylesheet. Typically the active theme stylesheet, but can be overridden in theme settings.

SearchTerms - html-entity-escaped string of the terms used for a search

Menu - Contains the menus that are present on the page. Each menu is a property of Menu (e.g. Menu.Primary, Menu.Audience, Menu.Page) and is an object that contains the fully marked-up version of the Menu as well as an array of all the items in the menu

CopyrightYear - Current year for use in the footer

Events - can be either an array of Event objects as returned from Localist, or an array of MizzouPosts if Event is a custom post type.

Pagination - contains the property paged indicating whether the request contains pagination, and an array pages of pagination item objects.

PaginationClass - optional classname that can be overridden

PageItem - Pagination item object that has the properties: text, class, and href

SearchResults - could be the structured results from a search service (e.g. GSA, GSE) or an array of MizzouPosts if using the internal wp search functionality.