## url = "/blog/post/:slug/:id" layout = "blog" title = "Display a Blog Post" meta_title = "{{ blog.title }} - Blog" [section post] handle = "Blog\Post" identifier = "id" [collection blogCategories] handle = "Blog\Category" [resources] vars[activeNavLink] = 'blog' == {% if post is empty %} {% do abort(404) %} {% elseif post.slug and post.slug != this.param.slug %} {% do redirect(''|page({ slug: post.slug }), 301) %} {% endif %}
{% if post.banner %} {% else %} {% endif %}

{{ post.title }}

{% if post.entry_type == 'markdown_post' %} {{ post.content|md|content }} {% else %} {{ post.content|content }} {% endif %}
{% partial 'controls/gallery-slider' gallery=post.gallery %}
{% if post.categories %}
Posted in {% for category in post.categories %} {{ category.title }}{{ not loop.last ? ',' }} {% endfor %}
{% endif %}
{{ post.published_at_date|date('j M Y') }}
{% if post.author %}
{% partial 'elements/user-panel-author' user=post.author %}
{% endif %}
{% partial 'blog/comment-list' %}
{% partial 'blog/comment-form' %}