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.9.tar.gz (19.1 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.9-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for wagtail_tabbed_structblock-0.0.9.tar.gz
Algorithm Hash digest
SHA256 e021f7db4e86ebf7c886033fb7918e89204b2beafa6af3e6ae0801227daddf06
MD5 602767bfcf125defb740c9c8c523ad17
BLAKE2b-256 2fa30cda31114ee06a1b47a78e97b8f2d281218bf717ce8861a0e8d894c4b424

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtail_tabbed_structblock-0.0.9.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.9-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_tabbed_structblock-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b0c57caf1935075cf20f147d3a48c4cd794393a4c981892f8ba2706a10b763f6
MD5 27e349096edcb797bd024498e1ae2d44
BLAKE2b-256 6539b9c21b6fee64c82135b5ed716b4b8a4fbc1e7475fe91cffa70904a8bad90

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtail_tabbed_structblock-0.0.9-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