Skip to main content

collective.behavior.banner

A behavior to create banners and sliders from banners.

Features

Banner

A banner is usually some text and an image that is displayed above of the content.

The behavior collective.behavior.banner.banner.IBanner has various fields (image, title, subtitle, richtext, link, linkcaption etc) that are combined to build a banner. You can enable the behavior on any Dexterity type (tested with plone.app.contenttypes) or for the whole Plone site.

Slider

The behavior collective.behavior.banner.slider.ISlider adds the option to add relations to several banners (i.e. items that have the Banner behavior enabled). These banners are then displayed like a banner but fade.

The slider viewlet uses the javascript library http://responsiveslides.com and fades from one banner to another. You can easily use a different javascript libray by overriding the viewlet templates (see below).

Before you use a slider/carousel on your website, please take time to read http://shouldiuseacarousel.com.

Inheriting

Banners are inherited by child objects. In a controlpanel you can configure which types should display inherited banners. You can also prevent inheriting banners for an item and its child objects by enabling the option Do not inherit banner from parents on the banner tab. If you want a banner for the entire site, you can assign one to the default content of the Navigation Root (or Plone site root).

Customization

To change the appearance (e.g. if you use a bootstrap theme or want to use a different effect in the slider) you can easily override the respective viewlets with z3c.jbot or plone.app.themingplugins (if you use plone.app.theming). The names of the files to create would be collective.behavior.banner.browser.banner.pt and collective.behavior.banner.browser.slider.pt.

Demo

collective.behavior.banner is used on the following sites:

Compatibility

collective.behavior.banner works in Plone 4, 5 and 6.

  • Plone 6: 2.x

  • Plone 5: 1.x

  • Plone 4: 0.x

Installation

To install collective.behavior.banner you simply add collective.behavior.banner to the list of eggs in your buildout, run buildout and restart Plone. Then, install collective.behavior.banner using the Add-ons control panel.

Enable the behavior by hand or in the FTI <your_package>/profiles/default/types/Folder.xml:

<?xml version="1.0"?>
<object name="Folder" meta_type="Dexterity FTI">
 <property name="behaviors" purge="False">
  <element value="collective.behavior.banner.banner.IBanner"/>
 </property>
</object>

Contribute

Support

If you are having issues, please let us know at https://github.com/collective/collective.behavior.banner/issues.

orphan:

Changelog

2.0 (2023-11-10)

  • Add support for Plone 6. [petschki]

1.3 (2021-01-22)

  • Set RelatedItemsFieldWidget to search to find all banners for a slider. [pbauer]

  • Fix use of default_page [pbauer]

  • Use named behaviors. [pbauer]

1.2 (2019-03-14)

  • Add support for Python 3. [pbauer]

1.1 (2018-09-18)

  • Use the banner from the root default content if there is one [Vaal24]

1.0 (2018-08-16)

  • Add alt tag for banner image. [tlotze]

1.0b2 (2017-06-20)

  • Pass full banner-obj to templates to allow accessing object-attibutes. [pbauer]

  • Test against Plone 5.0.7 and fix all pep8-issues. [pbauer]

  • Show YouTube and Vimeo videos in a banner. [fulv]

1.0b1 (2015-11-30)

  • Use p5-style resources. [pbauer]

  • No longer explicitly set the relateditemswidget (it’s default in p5). [pbauer]

  • Fix RelationList widget for slider_relation field. Fixes #1. [fulv]

  • Remove last traces of grok. [fulv]

  • Add compatability to Plone 5 with new buildout and test-setup. [pbauer]

0.2 (2015-11-30)

  • Add Documentation. [pbauer]

  • Remove grok. [pbauer]

  • Simplify traversing. [pbauer]

  • Unify css and templates. [gomez]

  • Basic styling for banner/slider. [santonelli]

0.1 (26.3.2014)

  • Initial release. [pbauer, gomez]

Metadata

Release files for collective.behavior.banner 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.behavior.banner 2.0
File Size Uploaded
collective.behavior.banner-2.0.tar.gz 23.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for collective.behavior.banner 2.0
File Interpreter ABI Platform
collective.behavior.banner-2.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.1 kB

Release files / collective.behavior.banner-2.0.tar.gz

Download URL collective.behavior.banner-2.0.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b088c87ebba8acdcc0bd2e87e54ec46598784f476cb0468828cb76c070a95afc
BLAKE2b-256 checksum
How to use checksums
6d3d71f035d77ed2bbcc2383c5e26c925fe263cbf6776435090b90fa71e6c725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / collective.behavior.banner-2.0-py3-none-any.whl

Download URL collective.behavior.banner-2.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0358d48ad5d5f043e8cbcfbe0d638bd745b474a5147b8260cc0a356b30053878
BLAKE2b-256 checksum
How to use checksums
2110261770a11024fb8ce933a9fd367b80339cf0deab374eb8fa81277455e41c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page