You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After that commit, the wrapping's changed to be a bit more specific:
{% if table.page and table.paginator.num_pages > 1 %}
{% block pagination %}
...
{% endblock pagination %}
{% endif %}
I've got an app which had been extending the tables.html template to provide custom pagination... In instances where there's only one page to display, in the new version the pagination block itself just doesn't exist to be overridden anymore. So my custom pagination override doesn't show up either.
Is it possible to flip the block and if statements so that the block exists regardless of the number of pages? Something basically like:
{% block pagination %}
{% if table.page and table.paginator.num_pages > 1 %}
...
{% endif %}
{% endblock pagination %}
That way it'd still be empty ordinarily, but someone extending the template would still be able to make use of it in all cases.
The text was updated successfully, but these errors were encountered:
Ohh, sure, I didn't even think to check the others, but you're right -- the same thing is in the rest, too. That's been added to the PR, though Travis CI is still doing its thing on it. (I've not really tested those manually, though I did run 'em through the unit tests again, at least.)
Prior to 8f4146d, the
pagination
block intable.html
was wrapped in this:After that commit, the wrapping's changed to be a bit more specific:
I've got an app which had been extending the
tables.html
template to provide custom pagination... In instances where there's only one page to display, in the new version thepagination
block itself just doesn't exist to be overridden anymore. So my custompagination
override doesn't show up either.Is it possible to flip the
block
andif
statements so that the block exists regardless of the number of pages? Something basically like:That way it'd still be empty ordinarily, but someone extending the template would still be able to make use of it in all cases.
The text was updated successfully, but these errors were encountered: