1234567891011121314151617181920212223242526272829303132333435363738394041 |
- {% extends "index.twig" %}
- {% block content %}
- {% set astring = url_param('q','string') %}
- {% set length = aut_count[astring] %}
- {% if length == 1 %}
- <h4>{{astring}} wrote 1 post</h4>
- {% else %}
- <h4>{{astring}} wrote {{ length }} posts</h4>
- {% endif %}
- {% if config.tagblog.paging > 0 and length > config.tagblog.paging %}
- {% set p = url_param('p','int',1) %}
- {% set offset = (p - 1) * config.tagblog.paging %}
- {% set lastpage = length//config.tagblog.paging %}
- {% if length%config.tagblog.paging > 0 %}{% set lastpage = lastpage + 1 %}{% endif %}
- {% for page_id in aut_pages[astring]|slice(1)|split('#')|slice(offset,config.tagblog.paging) %}
- {% set page = pages[page_id] %}
- {% include 'includes/postlistitem.twig' %}
- {% endfor %}
- <div class="pagination clearfix">
- {% if offset >= config.tagblog.paging %}
- <div class="previous"><a href="/authors?q={{astring}}&p={{ p - 1 }}"><Previous Page</a></div>
- {% endif %}
- {# {% if offset >= config.tagblog.paging and offset + config.tagblog.paging < length %} | {% endif %} #}
- <div class="current">- {{ p }}/{{ lastpage }} -</div>
- {% if offset + config.tagblog.paging < length %}
- <div class="next"><a href="/authors?q={{astring}}&p={{ p + 1 }}">Next Page></a></div>
- {% endif %}
- </div>
- {% else %}
- {% for page_id in aut_pages[astring]|slice(1)|split('#') %}
- {% set page = pages[page_id] %}
- {% include 'includes/postlistitem.twig' %}
- {% endfor %}
- {% endif %}
- {% endblock content %}
|