From 4886ed6d3637df0b3e16e672d58d4ef8f17dc432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 6 Dec 2013 14:22:29 +0100 Subject: [add] page which lists entries for a tag --- themes/default/tag.twig | 33 +++++++++++++++++++++++++++++++++ themes/default/tags.twig | 2 +- themes/default/view.twig | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 themes/default/tag.twig (limited to 'themes') diff --git a/themes/default/tag.twig b/themes/default/tag.twig new file mode 100644 index 00000000..364c7cd4 --- /dev/null +++ b/themes/default/tag.twig @@ -0,0 +1,33 @@ +{% extends "layout.twig" %} +{% block title %}tag {% endblock %} +{% block menu %} +{% include '_menu.twig' %} +{% endblock %} +{% block content %} +

{% trans "Tag" %} {{ tag.value }}

+ {% if entries is empty %} +

{% trans "No link available here!" %}

+ {% else %} + {% block pager %} + {% if nb_results > 1 %} +
+
{{ nb_results }} {% trans "results" %}
+ {{ page_links | raw }} +
+ {% endif %} + {% endblock %} + {% for entry in entries %} +
+

{{ entry.title|raw }}

+ +

{{ entry.content|striptags|slice(0, 300) }}...

+
+ {% endfor %} + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/themes/default/tags.twig b/themes/default/tags.twig index 9421fe3e..e179143d 100644 --- a/themes/default/tags.twig +++ b/themes/default/tags.twig @@ -4,5 +4,5 @@ {% include '_menu.twig' %} {% endblock %} {% block content %} -{% for tag in tags %}{{ tag.value }} {% endfor %} +{% for tag in tags %}{{ tag.value }} {% endfor %} {% endblock %} \ No newline at end of file diff --git a/themes/default/view.twig b/themes/default/view.twig index 9f9e23c8..7e096a95 100644 --- a/themes/default/view.twig +++ b/themes/default/view.twig @@ -21,7 +21,7 @@

{{ entry.title|raw }}

{{ content | raw }} -- cgit v1.2.3