noob
noob

Reputation: 140

Digg-style pagination customize in template

I am using django-el-pagination package and trying to implement digg-style pagination on my home template. I am displaying it with..

{% get_pages %}
{{ pages.get_rendered }}

and it is showing like this <1234567> which is fine but

  1. I want to add some css or class to change the way it look.

If you have any other way to achieve this. Please suggest..

please tell how can I customize it.

Upvotes: 1

Views: 281

Answers (1)

Kevin Ramirez Zavalza
Kevin Ramirez Zavalza

Reputation: 1785

You can change it to make it looks something like this or like whatever you want:

enter image description here

Here is an example:

{% get_pages %}
<div class="pagination">
    {% for page in pages %}
        <li class="page-item"><a href="{{ page.url }}" class="page-link">{{ page.number }}</a></li>
    {% endfor %}
</div>

You can check the documentation here: https://django-el-pagination.readthedocs.io/en/latest/templatetags_reference.html#get-pages to check all the available options for get_pages

Upvotes: 0

Related Questions