PHP Classes

File: app/Views/Controller/blog/index.html.twig

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy  >  Silex MVC Blog  >  app/Views/Controller/blog/index.html.twig  >  Download  
File: app/Views/Controller/blog/index.html.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Silex MVC Blog
MVC based blog using on the Silex micro-framework
Author: By
Last change:
Date: 6 years ago
Size: 1,068 bytes
 

Contents

Class file image Download
{# app/Views/Controller/blog/index.html.twig #}
{% extends "Layout/base.html.twig" %}

{% block title %}{{ controller|capitalize }}{% endblock title %}
{% block head %}
    {{ parent() }}
{% endblock head %}

{% block page_name %}{{ 'all_posts'|trans|title }}{% endblock page_name %}

{% block content %}
    {% for user, user_posts in posts %}
        {% if user_posts|length %}
            <div class="page-header"><h3>{{ 'author'|trans|capitalize }}: <a href="/blog/posts/{{ user }}">{{ user }}</a></h3> </div>
            {% for post in user_posts %}
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <p class="panel-title"><strong>{{ post.title }}</strong></p>
                        <p class="post-date">{{ post.created|date("d.m.Y") }}</p>
                    </div>
                    <div class="panel-body">
                        {{ post.body }}
                    </div>
                </div>
            {% endfor %}
        {% endif %}
    {% endfor %}
{% endblock content %}

For more information send a message to info at phpclasses dot org.