7. Plugins reference

    For installation be sure you have the following in the setting in your project’s settings.py file:

    You should take care that the directory defined by the configuration setting (by default cms_page_media/ relative to MEDIA_ROOT) is writable by the user under which django will be running.

    You might consider using with django CMS plugin and its cmsplugin_filer_file component instead.

    Warning

    The builtin file plugin does only work with local storages. If you need more advanced solutions, please look at alternative file plugins for the django CMS, such as .

    7.2. Flash

    Allows you to upload and display a Flash SWF file on your page.

    For installation be sure you have the following in the setting in your project’s settings.py file:

    1. INSTALLED_APPS = (
    2. # ...
    3. 'cms.plugins.flash',
    4. # ...
    5. )

    7.3. GoogleMap

    Displays a map of an address on your page.

    For installation be sure you have the following in the setting in your project’s settings.py file:

    1. INSTALLED_APPS = (
    2. # ...
    3. 'cms.plugins.googlemap',
    4. # ...
    5. )

    Displays a link to an arbitrary URL or to a page. If a page is moved the URL will still be correct.

    For installation be sure to have the following in the INSTALLED_APPS setting in your project’s settings.py file:

    1. INSTALLED_APPS = (
    2. # ...
    3. 'cms.plugins.link',
    4. # ...
    5. )

    Note

    As of version 2.2, the link plugin no longer verifies the existance of link targets.

    7.5. Picture

    Displays a picture in a page.

    For installation be sure you have the following in the INSTALLED_APPS setting in your project’s settings.py file:

    In your project template directory create a folder called cms/plugins and create a file called picture.html in there. Here is an example picture.html template:

    1. {% spaceless %}
    2. {% if picture.url %}<a href="{{ picture.url }}">{% endif %}
    3. {% ifequal placeholder "content" %}
    4. <img src="{% thumbnail picture.image.name 484x1500 upscale %}" {% if picture.alt %}alt="{{ picture.alt }}" {% endif %}/>
    5. {% endifequal %}
    6. {% ifequal placeholder "teaser" %}
    7. <img src="{% thumbnail picture.image.name 484x1500 upscale %}" {% if picture.alt %}alt="{{ picture.alt }}" {% endif %}/>
    8. {% if picture.url %}</a>{% endif %}
    9. {% endspaceless %}

    In this template the picture is scaled differently based on which placeholder it was placed in.

    You should take care that the directory defined by the configuration setting (by default cms_page_media/ relative to MEDIA_ROOT) is writable by the user under which django will be running.

    Note

    For more advanced use cases where you would like to upload your media to a central location, consider using with django CMS plugin and its cmsplugin_filer_video component instead.

    7.6. Snippet

    Renders a HTML snippet from a HTML file in your templates directories or a snippet given via direct input.

    For installation be sure you have the following in the INSTALLED_APPS setting in your project’s settings.py file:

    1. INSTALLED_APPS = (
    2. # ...
    3. 'cms.plugins.snippet',
    4. # ...
    5. )

    Note

    This plugin should mainly be used during development to quickly test HTML snippets.

    Displays a teaser box for another page or a URL. A picture and a description can be added.

    For installation be sure you have the following in the settings in your project’s settings.py file:

    1. INSTALLED_APPS = (
    2. # ...
    3. 'cms.plugins.teaser',
    4. # ...
    5. )

    You should take care that the directory defined by the configuration setting CMS_PAGE_MEDIA_PATH (by default cms_page_media/ relative to ) is writable by the user under which django will be running.

    Note

    For more advanced use cases where you would like to upload your media to a central location, consider using django-filer with and its cmsplugin_filer_video component instead.

    7.8. Text

    Displays text. If plugins are text-enabled they can be placed inside the text-flow. At this moment the following core plugins are text-enabled:

    • cms.plugins.link
    • cms.plugins.picture
    • cms.plugins.file
    • cms.plugins.snippet

    Note

    When using django-tinymce, you also need to configure it. See the for more information.

    For installation be sure you have the following in your project’s INSTALLED_APPS setting:

    1. # ...
    2. 'cms.plugins.text',
    3. # ...
    4. )

    7.9. Video

    Plays Video Files or Youtube / Vimeo Videos. Uses the OSFlashVideoPlayer. If you upload a file use .flv files or h264 encoded video files.

    For installation be sure you have the following in your project’s setting:

    1. INSTALLED_APPS = (
    2. 'cms.plugins.video',
    3. # ...
    4. )

    There are some settings you can set in your settings.py to overwrite some default behavior:

    • VIDEO_AUTOPLAY ((default: False)
    • VIDEO_AUTOHIDE (default: False)
    • VIDEO_FULLSCREEN (default: True)
    • VIDEO_LOOP (default: False)
    • VIDEO_AUTOPLAY (default: False)
    • VIDEO_BG_COLOR (default: "000000")
    • VIDEO_TEXT_COLOR (default: "FFFFFF")
    • VIDEO_SEEKBAR_COLOR (default: "13ABEC")
    • VIDEO_SEEKBARBG_COLOR (default: "333333")
    • VIDEO_LOADINGBAR_COLOR (default: "828282")
    • VIDEO_BUTTON_OUT_COLOR (default: "333333")
    • VIDEO_BUTTON_OVER_COLOR (default: "000000")
    • VIDEO_BUTTON_HIGHLIGHT_COLOR (default: "FFFFFF")

    You should take care that the directory defined by the configuration setting CMS_PAGE_MEDIA_PATH (by default cms_page_media/ relative to ) is writable by the user under which django will be running.

    Note

    For more advanced use cases where you would like to upload your media to a central location, consider using django-filer with and its cmsplugin_filer_video component instead.

    Displays the last number of post of a twitter user.

    For installation be sure you have the following in your project’s INSTALLED_APPS setting:

    1. INSTALLED_APPS = (
    2. # ...
    3. 'cms.plugins.twitter',
    4. # ...

    Note

    Since avatars are not guaranteed to be available over SSL (HTTPS), by default the Twitter plugin does not use avatars on secure sites.

    7.11. Inherit

    Displays all plugins of another page or another language. Great if you need always the same plugins on a lot of pages.

    For installation be sure you have the following in your project’s INSTALLED_APPS setting:

    The inherit plugin is currently the only core-plugin which can not be used in non-cms placeholders.