post
Calling the post object returns the current post. Calling the post’s singular content type name (E.g. ‘category’) also returns the post object. So both {{ post }}
and {{ category }}
return the same post in this case.
post.breadcrumbs
Returns object of breadcrumbs for the post.
Input:
{{ post.breadcrumbs }}
Output:
[
{url: "/", title: "Home"},
{url: "/blogposts", title: "Blog posts"},
{url: "/blogposts/my-first-blogpost", title: "My first blog post"}
]
post.sections
Returns array of sections that have the post object as parent.
{{ post.sections }}
post.title
Returns post title.
post.slug
Returns post slug, the part of the URL that identifies the post.
Input:
Output:
post.published_at
The post’s publish date and time.
post.url
The post url.
Input:
Output:
post.seo_title
Returns post SEO title.
post.seo_description
Returns post SEO description.
post.content_type
Returns content_type object.
post.parent
Returns parent, if there is a parent set in the Post settings.
post.children
Returns list of children posts, only if the current post is set as a parent in the Post settings.
post.translations
Returns an array of translations of the Post. Can be empty.
post.is_index
Returns a boolean true if the post is an index post for a post type. False if it isn’t
post.is_homepage
Returns a boolean true if the post is the homepage.
post.is_published
Returns true
if the post is published, false
when it isn’t
post.referenced_in_[content_type]_as_[content_field]
If the post is referenced elsewhere, you can query on which objects by calling this. E.g. when the post is referenced from a reference ContentField named categories
on another ContentType named blog_posts
, you would call post.referenced_in_blog_posts_as_categories
. Which would return all Blog Posts, where the post was referenced as a category.
post.order_position
Returns the value of the ‘position’ of the post.