{% if not a %} {% if p > 1 %} previous {% if p < topic.page_count %}/{% endif %} {% endif %} {% if p < topic.page_count %} next {% endif %} {% if topic.page_count > 1 %} - last page {% endif %} {% else %} {% if p > 1 %} previous {% if p < topic.page_count %}/{% endif %} {% endif %} {% if p < topic.page_count %} next {% endif %} {% if topic.page_count > 1 %} - last page {% endif %} {% endif %}