Skip to main content

A pagination plugin app for django wagtail CMS

Project description

A simple Django Wagtail app to add paginated pages under a root page using a mixin /template tag approach.

Quick start

  1. Add “wagtail_paginated_subpages” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'wagtail_paginated_subpages',
    ]
  2. import the mixin and include it before the Page (or other) classes:

    from wagtail_paginated_subpages.mixins.pagination import PaginatedMixin
    
    
    class ContentPage(PaginatedMixin, BaseCMSPage):
    
        pass
  3. Use the paginated content in a paginated page template:

    {% for page in paginated_objects %}
            <h2>{{ page.title }}</h2>
        {% endfor %}
    </ul>
  4. Use the pagination template tag to add pagination:

    {% load wagtail_paginated_tags %}
    {% render_pagination page=page paginated_objects=paginated_objects %}
  5. Navigate to page with child pages and list of child pages should be present

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-paginated-subpages-0.5.1.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page