tags.twig 642 B

12345678910111213141516171819
  1. {% extends "index.twig" %}
  2. {% block content %}
  3. <article>{% set tstring = url_param('q','string') %}
  4. {% set count = tag_count[tstring] %}
  5. {% if not tstring %}
  6. <h4>No tags provided.</h4>
  7. {% elseif count == 1 %}
  8. <h4>1 post is tagged "{{tstring}}"</h4>
  9. {% else %}
  10. <h4>{{ count }} posts are tagged "{{tstring}}"</h4>
  11. {% endif %}
  12. {% set paging_url_base = current_page.url ~ '?q=' ~ tstring ~ '&' %}
  13. {% set paging_array = {} %}
  14. {% for page_id in tag_pages[tstring]|slice(1)|split('#') %}
  15. {% set paging_array = paging_array|merge([pages[page_id]]) %}
  16. {% endfor %}
  17. </article>{% include 'includes/paging.twig' %}
  18. {% endblock content %}