[viewBag]
==
{% if posts.lastPage > 1 %}
    <div class="paging">
        <ul class="pagination">
            {% if posts.currentPage > 1 %}
                <li><a href="{{ this.page.baseFileName|page({ (blogPosts.pageParam): (posts.currentPage-1) }) }}"><i class="fa fa-angle-double-left"></i></a></li>
            {% endif %}
           
            {% for page in 1..posts.lastPage %}
                 <li class="{{ posts.currentPage == page ? 'active' : null }}"><a href="{{ this.page.baseFileName|page({ (blogPosts.pageParam): page }) }}">{{ page }}</a></li>
            {% endfor %}
           
            {% if posts.lastPage > posts.currentPage %}
                <li><a href="{{ this.page.baseFileName|page({ (blogPosts.pageParam): (posts.currentPage+1) }) }}"><i class="fa fa-angle-double-right"></i></a></li>
            {% endif %}
        </ul>
    </div>
{% endif %}