Hero¶
Models¶
A hero component with an image (commonly for background) and a content.
- class cmsplugin_blocks.models.hero.Hero(*args, **kwargs)[source]¶
Hero component.
- template¶
Template choice from available plugin templates in setting
BLOCKS_HERO_TEMPLATES. Default to the first choice item.
- image¶
Optional image file.
- image_alt¶
An optional text string for alternative image text.
- size_features¶
Optional related size features.
- color_features¶
Optional related color features.
- extra_features¶
Optional related extra features.
- content¶
Required long text, it will be editable through CKeditor on plugin form.
Factories¶
Forms¶
- class cmsplugin_blocks.forms.hero.HeroForm(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]¶
Hero form used in plugin editor.
- property media¶
Return all media required to render the widgets on this form.