Accordion¶
Models¶
Represents a accordion component, functionally similar to a Slider, except that a accordion item cannot contain hyperlinks or their associated contents.
Accordion items are ordered from their order field value. Items with a zero
value for their order will be ordered in an almost arbitrary order (mostly
depending from item object id).
- class cmsplugin_blocks.models.accordion.Accordion(*args, **kwargs)[source]¶
Accordion container for items.
- title¶
A required title string.
- template¶
Template choice from available plugin templates in setting
BLOCKS_ACCORDION_TEMPLATES. Default to the first choice item.
- keep_open¶
Checkbox to enable “keep items opened” behavior.
- size_features¶
Optional related size features.
- color_features¶
Optional related color features.
- extra_features¶
Optional related extra features.
- class cmsplugin_blocks.models.accordion.AccordionItem(*args, **kwargs)[source]¶
Accordion item to include in container.
- title¶
Required title string.
- image¶
Required image file.
- image_alt¶
An optional text string for alternative image text.
- content¶
Optional long text, it will be editable through CKeditor on plugin form.
- order¶
Number for order position in item list.
- opened¶
Checkbox to initially open item.
Factories¶
Forms¶
- class cmsplugin_blocks.forms.accordion.AccordionForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶
- property media¶
Return all media required to render the widgets on this form.
- class cmsplugin_blocks.forms.accordion.AccordionItemForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶
- property media¶
Return all media required to render the widgets on this form.
Plugins¶
- class cmsplugin_blocks.plugins.accordion.AccordionPlugin(model=None, admin_site=None)[source]¶
Accordion interface is able to add/edit/remove accordion items as inline forms.
- form¶
alias of
AccordionForm