{% extends "MZBlogBundle::layout.html.twig" %}

{% block title %}Miguel Perez &bull; {{ post.title }}{% endblock %}

{% block description %}{{ post.description }}{% endblock %}

{% block keywords %}{{ post.keywords }}{% endblock %}


{% block content %}
<h1>{{ post.title }}</h1>{{ time_diff(post.createdAt) }}
<p>{{ post.body | raw }}</p>
{% if is_granted('ROLE_ADMIN') %}<a href="{{ path('mz_blog_admin_edit',{ 'slug': post.slug }) }}">Edit post</a>{% endif %}
{% endblock %}
{% extends "MZBlogBundle::layout.html.twig" %}

{% block title %}Miguel Perez &bull; {{ post.title }}{% endblock %}

{% block description %}{{ post.description }}{% endblock %}

{% block keywords %}{{ post.keywords }}{% endblock %}


{% block content %}
{% if post.type =="post" %}
<h1>{{ post.title }}</h1><span>{{ time_diff(post.createdAt) }}</span>
<p>{{ post.body | raw }}</p>
<div class="meta"> {% for tag in post.tags %}<a href="{{ path('mz_blog_tags_index',{ 'name': tag.slug }) }}">{{ tag.name }}</a>{% if not loop.last %}, {% endif%}{% endfor%} {{ time_diff(post.createdAt) }}</div>
{% elseif post.type == 'link'%}

<h1><a href="{{ post.link }}">{{ post.title }}</a></h1><span>{{ time_diff(post.createdAt) }}</span>
<p>{{ post.body | raw }}</p>
<div class="meta"> {% for tag in post.tags %}<a href="{{ path('mz_blog_tags_index',{ 'name': tag.slug }) }}">{{ tag.name }}</a>{% if not loop.last %}, {% endif%}{% endfor%} {{ time_diff(post.createdAt) }}</div>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}<a href="{{ path('mz_blog_admin_edit',{ 'slug': post.slug }) }}">Edit post</a>{% endif %}
{% endblock %}
Change how link type posts are display.
Change how link type posts are display.
