Card

A card component with a title, image, features and content.

class cmsplugin_blocks.models.card.Card(*args, **kwargs)[source]

Card component.

title

An optional title string.

template

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

features

Optional string of CSS class names divided by a single comma.

image

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

Optional string for link URL.

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

content

Optional long text, it will be editable through CKeditor on plugin form.

get_features()[source]

Merge feature items into a string with a comma divider.

Returns:Feature items divided by a comma. Duplicate items are removed and original order is preserved.
Return type:string