Skip to main content

No project description provided

Project description

Tabbed StrucBlock

A new UI for StrucBlocks

As custom blocks grow in fields it becomes necessary to group and hide some of the block fields. Tabbed StrucBlock allows such grouping into a tabbed UI.

Installation

  1. Install the package with pip install wagtail-tabbed-strucblock.
  2. Add to INSTALLED_ADD as wagtail_tabbed_structblock.

Usage

  1. Import the class with from wagtail_tabbed_structblock.blocks import TabbedStructBlock.
  2. Create your StructBlock as usual extending TabbedStructBlock.
  3. Define the tabs in the Meta class of the block as shown in the example below.
from wagtail import blocks

from wagtail_tabbed_structblock.blocks import TabbedStructBlock


class ExampleBlock(TabbedStructBlock):
    title = blocks.CharBlock()
    content = blocks.RichTextBlock()


    class Meta:
        tabs = {
            'Header': ('title',),
            'Body': ('content',)
        }

The tabs property of the Meta class is a dictionary composed of the title of the tab and a tuple of the fields you want to include on that tab.

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_tabbed_structblock-0.0.10.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtail_tabbed_structblock-0.0.10-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file wagtail_tabbed_structblock-0.0.10.tar.gz.

File metadata

File hashes

Hashes for wagtail_tabbed_structblock-0.0.10.tar.gz
Algorithm Hash digest
SHA256 3ab61971745b9a5a49d68d48cb0061bd69fd1f96e49ad792bdf342d53b289104
MD5 8bedbdbd2b0de9c55f50f7c094300612
BLAKE2b-256 d9281b5bc05de092d8bc0be742f814ce6d196c298db1d2bf42908e427afbd781

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtail_tabbed_structblock-0.0.10.tar.gz:

Publisher: release.yml on AgenciaEgo/wagtail_tabbed_structblock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wagtail_tabbed_structblock-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_tabbed_structblock-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 af4ab29481e37781409cc8e80ecd245efbdd6ce7653f0acb0d048ff6fa23e484
MD5 fb760f7e41c43d2152b9bacbc428385f
BLAKE2b-256 d03fd6fff9aa7a0f45484181e274fd54752fb87e04c26a41c31819fc5f9761d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtail_tabbed_structblock-0.0.10-py3-none-any.whl:

Publisher: release.yml on AgenciaEgo/wagtail_tabbed_structblock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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