Variables

{{ collection }}

{{ collection }} prints the current WordPress post type.

Example#

phpresources/views/single.php
<article data-post-type="{{ collection }}">  <h1>{{ title }}</h1></article>

For normal posts this is post. For pages this is page. For custom post types, it is the custom post type slug.