Slider

Models

A slideshow component which may be similar to Album but with difference that a slide item can have HTML content.

Slide 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.slider.Slider(*args, **kwargs)[source]

Slide container for items.

title

A required title string.

template

Template choice from available plugin templates in setting BLOCKS_SLIDER_TEMPLATES. Default to the first choice item.

size_features

Optional related size features.

color_features

Optional related color features.

extra_features

Optional related extra features.

copy_relations(oldinstance)[source]

Copy FK relations when plugin object is copied as another object

See:

http://docs.django-cms.org/en/latest/how_to/custom_plugins.html#for-foreign-key-relations-from-other-objects

class cmsplugin_blocks.models.slider.SlideItem(*args, **kwargs)[source]

Slide 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.

Optional string for link name.

Optional string for link URL.

Checkbox to enable opening link URL in a new window/tab.

Factories

Forms

class cmsplugin_blocks.forms.slider.SliderForm(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.slider.SlideItemForm(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.slider.SliderPlugin(model=None, admin_site=None)[source]

Slider interface is able to add/edit/remove slide items as inline forms.

model

alias of Slider

form

alias of SliderForm

get_fieldsets(request, obj=None)[source]

Define plugin form fieldsets depending features are enabled or not (when there is no defined feature choices).