Album

An album component you may use in a gallery.

Album 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).

Album form have a special field mass_upload, it expects a valid ZIP archive file to create items. Archive file is limited to the value from setting BLOCKS_MASSUPLOAD_FILESIZE_LIMIT.

The archive file may contains one or many image files with enabled format from setting BLOCKS_ALLOWED_IMAGE_EXTENSIONS. Each image will create a new Album item where the name will be filled with the full relative image file path. Images in archive can be structured in multiple subdirectory. Created Album item from an archive don’t have any order.

class cmsplugin_blocks.models.album.Album(*args, **kwargs)[source]

Album container for items.

title

A required title string.

template

Template choice from available plugin templates in setting BLOCKS_ALBUM_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 all relations when plugin object is copied as another object.

See:

https://docs.django-cms.org/en/latest/how_to/09-custom_plugins.html#relations-between-plugins

class cmsplugin_blocks.models.album.AlbumItem(*args, **kwargs)[source]

Album item to include in container.

title

Optional title string.

order

Number for order position in item list.

image

Required image file, limited to enabled image formats from settings BLOCKS_ALLOWED_IMAGE_EXTENSIONS.

image_alt

An optional text string for alternative image text.