Skip to main content

A product to create page compositions in Plone. Content can be created directly inside the object or existing items can be pulled in for display.

Project description

Collage

Compatibility

  • Plone 3.1-3.3

  • Five 1.5

About

Collage is a product for aggregating and displaying multiple content items on a single page.

It provides the following content-types:

  • Collage

  • Row

  • Column

  • Alias

The first three are structural containers that provide basic layouting functionality. The premise is that a column fits inside a row which again fits inside a collage.

The Alias-type is provided to allow displaying existing objects from the site inside the collage.

Upgrading

If you upgraded Products.Collage in the file system, open in ZMI /your/plone/site/portal_setup and click the “Upgrades” tab.

Select the “Products.Collage:default” profile and see if upgrades are available. Run them :D

Javascript functionality

We use the jquery-library to facilitate easy scripting. Ajax is used to move content items, columns and rows around without reloading the page.

Status

Used in production.

Support for add-on packages

These should be added to the collective.collage package:

under ./browser/addons/<package name>

Make sure collective.collage is in your python path if you want these views registered for use in Collage.

See DEVELOPER.txt to add support for custom content types and themings.

Issue tracker

http://www.plone.org/products/collage/issues

Credits

Development:

Translations:

Sponsors

Work on this product has been sponsored by Headnet (http://www.headnet.dk) and EDF (http://www.edf.fr)

Collage developer documentation

The Collage product was built to be easily customizable.

Content views

New content views can be added by registering a browser view with a browser:page-directive. Examples of this can be found in:

./browser/views.zcml

A view for a standard document can be registered as follows:

<browser:page
   name="my-view"
   for="Products.ATContentTypes.content.document.ATDocument"
   permission="zope.Public"
   template="my-view-template.pt"
   class=".document.MyDocumentView"
   layer="Products.Collage.interfaces.ICollageBrowserLayer"
   />

To display a human-readable title, we associate the view with the following class, placed in a file document.py::

from Products.Five.browser import BrowserView

class MyDocumentView(BrowserView):
    title = u'My view'

Theme-specific content views

If you want to add a new view or override an existing view only for sites using one particular theme product, you must register a theme-specific Collage layer. (We can’t reuse the normal theme-specific layer, because then there’s no way to tell that the view is a Collage view).

To add a theme-specific Collage layer, use the following ZCML:

<interface
    interface=".path.to.IMyCollageThemeLayer"
    type="Products.Collage.interfaces.ICollageBrowserLayerType"
    name="Plone Default"
    />

where the interface attribute is a custom marker interface that you have defined, and the name attribute is the name of the CMF theme with which you want to associate this layer.

Then you can use layer=”.path.to.interfaces.IMyCollageThemeLayer” in your view ZCML registration, instead of Products.Collage.interfaces.ICollageBrowserLayer.

Skins views

New skins views can be added by registering a named utility in:

MySkin/browser/skins.zcml

For example, a skin “Alert” for the view “my-view” can be registered as follows:

<utility
   name="collage-my-view-alert"
   provides="Products.Collage.interfaces.IAlertSkin"
   factory=".skins.PortletSkin03"
/>

To display a human-readable title, we associate the utility with the following class, placed in a skins.py:

from Products.MySkin import MyMessageFactory as _

class PortletSkin03(object):
    title = _(u"skin-03", default=u"My portlet skin")

Add IAlertSkin in MySkin/interfaces.py:

from zope import interface
class IAlertSkin(interface.Interface):
     """Interface for alert skins views."""

To associate this skin to a view, you must add the interfaces implemented by the skin:

class MyDocumentView(BrowserView):
    title = u'My view'
    skinInterfaces = (IAlertSkin,)

Note that you don’t need this above stuff for portlets views that are already skinnable.

Finally, add your CSS rules in a stylesheet:

#collage .collage-my-view-alert {
 ...

}

Note that if you are using “Merge CSS composition” of CSS registry, your stylesheet must be after “collage.css” and use the same condition as the former:

object/@@collage|nothing

Products.Collage provides a minimal skinning demo. See the skindemo folder (start with skindemo/README.txt as usual).

Content controls

Content controls are registered as viewlets. See ./browser/viewlets.zcml for examples.

Changelog

1.2.2 (2009-06-07)

  • A UID can start with numbers. The value of the id attribute cannot start with a number by naming convention. The views now use: string:title-${view/getUniqueIdentifier}, which always starts with a t [jladage]

  • Don’t render empty descriptions in standard document. [jensens]

  • In Plone 3 the contributor is the one adding content. So default roles for “Add Collage content” is now Contributor, additional to Owner & Manager.

  • Don’t assume that a view is always available: added error view as fallback. It helps a lot in development and doesn’t expose ugly tracebacks to users if site has a configuration problem. Also minor cleanup and fixed tests. [jensens]

  • Added confirmation-popup for delete/remove action. [jensens]

  • Make viewlets following all the same paradigm. Reorder them according to usability thought. Turn expandable content into overlayed box. [jensens]

  • Turn add row into menu. Fix circular import problem instead ugly workaround. [jensens]

  • Added upgrade step to 1.2.2 that adds the alias whitelist property, without which the control panel crashes. [glenfant]

  • Synched all .po files following jensens’s changes and added french missing labels. [glenfant]

  • Make a difference between types to be added to Collage and types enabled for alias. This introduces a new whitelist in controlpanel. [jensens]

  • Feature “automatic split of rows with more than 3 entries” was broken. Its fixed now. I also added an unbatched view for the row. [jensens]

  • Almost completed German translation. [jensens]

  • Added Dutch translation (nl). [reinout]

  • Added portuguese (pt) translation. [igbun]

  • Added additional CSS classes to Collage blocks to make it easier to apply styles only for particular positions, content types, or Collage view names. [davisagli]

  • Typo in collage.css.dtml [glenfant]

  • Fixed issue where layouts would not be looked up correctly for aliases. [malthe]

  • Added support for theme-specific overrides of Collage views. See DEVELOPERS.txt for details. [davisagli]

  • Update and sync french and english translation. [kdeldycke]

Collage 1.2.1 (2008-12-10)

https://svn.plone.org/collective/Products.Collage/tags/1.2.1/

  • Moved event handlers in events.py module [glenfant]

  • Fixed bug on searching (spaces in type name or non ascii searchable text). Found items titles are colored according their workflow state as in folder_contents (…) [glenfant]

  • Use folder_summary_view instead of folder_listing in topic views. This fixes issue #43. [malthe]

  • Added Alias target search limit in config panel. [glenfant]

  • Optimizations of existing items view including link to target. [glenfant]

  • Removed code for old Plone (< 3.1) support since we can’t be used in Plone 3.0 or older anymore [glenfant]

  • Memoizing where possible to speed up views (not sure to be exhaustive) [glenfant]

  • New translations due to the control panel, and added translations synch script. [glenfant]

  • Fixed bug on @@collage_helper [glenfant]

  • Added control panel for Collage inner content types whitelist. [glenfant]

  • Collage is now LinguaPlone compatible and therefore Collage elements are now translatable. [erral]

  • Renderer: if a layout is defined on a canonical object, but not on a translation, now the canonical version’s layout setting is used for the translation rather than the default. (Language versions should look the same unless explicitly defined otherwise.) [thomasw]

  • Added Basque (eu) and Spanish (es) translations. [erral]

  • Added safety belt to GenericSetup upgrade scripts. [glenfant]

  • Added translation entries for new boolean in Collage. [glenfant]

  • Collage subcontents indexing is now an option, since a Collage object may be irrelevant in search results (i.e: a Collage with only File contents). [glenfant]

  • Added utilities.getFSVersionTuple that may help Collage extension components (add skins, content type support, …) [glenfant]

  • version.txt is major.minor.bugfix-[beta] to get synch with metadata.xml/version (when upgrade step required) and complying getFSVersionTuple above [glenfant]

  • Add missing event-related translation. [kdeldycke]

Collage 1.2.0 beta 3 (2008-08-15)

https://svn.plone.org/collective/Products.Collage/tags/1.2b3

  • Packaged as a python egg and released on pypi. [davisagli]

  • Renamed builtin portlet skins and gave minimum CSS to them. [glenfant]

  • Re-using ATContentTypes.content.schemata.ATContentTypesSchema and removing copied/pasted portions of code in our schema definitions. [glenfant]

  • Removed CMF skins layer “Collage” and spreaded its stuffs in Zope 3 style browser resources and pages (CSS). Added an upgrade step for this. [glenfant]

  • Using the MessageFactory for labels and descriptions in schemas. Code is more compact and i18ndude friendly. [glenfant]

  • Added unit tests for utilities. [glenfant]

Collage 1.2.0 beta 2

https://svn.plone.org/collective/Collage/tags/1.2.0beta2

  • Added a GenericSetup upgrade step to 1.2.0. [glenfant]

  • Removed useless Folder and Plone Site types setups. [glenfant]

Collage 1.2.0 beta 1

https://svn.plone.org/collective/Collage/tags/1.2.0beta1

  • Added a skin demo for portlets [glenfant]

  • Code cleanup with pyflakes [glenfant]

  • Registering skin with ZCML [glenfant]

  • Version is now 3 digits (major.minor.bugfix) as most components. [glenfant]

  • Extensions/* (Install script) is now useless. Removed [glenfant]

  • Removed meta_type attr in GS profile when not creating objects. (potentially harmful according to MArtin Aspeli) [glenfant]

  • Defining “view” variables in templates is harmful. Renamed to kssview (generally) [glenfant]

  • For reason I can’t understand, templates macros for KSS editing only work when in a <span metal:define-macro …> or a <div metal:define-macro …> [glenfant]

  • We must set each fied in its own macro in the xx_portlet.pt views otherwise KSS screams. [glenfant]

  • Made portlets skinnable (reintroduced some of the zegor branch) [glenfant]

  • Fixed unicode error in clipboard’s title (reintroduced fix from zegor branch). [glenfant]

  • I hate tabs for indenting (removed in every file I needed to change) [glenfant]

  • Some easy code refactorings: the trunk does not support Plone 2.x and older versions any more. [glenfant]

  • Added some markups for i18ndude in Python. [glenfant]

  • Moved (and added) tests to “tests” directory. [glenfant]

  • Making templates ready for i18ndude that found malformed stuffs when ZPT is more tolerant. [glenfant]

  • Made split- and expand-icons transparent [malthe]

  • Added clickable link view.

  • Simplified view class names. [malthe]

  • Removed annotations hack (we now expect content to be IAnnotatable). [malthe]

  • Image standard display now shows the actual image rather than its preview. This caused issues with large images in a Collage being upscaled when displayed. [rockdj]

Collage 1.1

https://svn.plone.org/collective/Collage/tags/1.1

  • Various bug fixes [malthe]

  • No longer ship with jQuery. [malthe]

  • Show locking viewlet in content menu [malthe]

  • Fixed a jQuery integration issue [malthe]

Collage 1.0

https://svn.plone.org/collective/Collage/tags/1.0-final

  • Added a search text field in existing_items to find items in large sites. Thanks to Silvio Tomatis for the patch. This closes ticket http://plone.org/products/collage/issues/12. [zegor]

  • Renamed manage_page to compose_page to avoid ZMI filtering access problem [zegor]

  • Added borders on manage_page to distinct rows, columns and items [zegor]

  • Added “portlets” views [zegor]

  • Rows, Colums and Aliases not indexed in portal_catalog [zegor]

  • Do not display Aliases with insufficient privileges [zegor]

  • Made the Collection item size matter, and added a More… button [regebro]

  • Added content views for ATLink, ATFile and ATNewsItem [zegor]

  • Fixed some i18n problems Added English and French po files Resynchronized po files with pot [zegor]

  • Do not display share and properties tabs with Plone 3.0 [zegor]

  • Added .metadata to cache icons [zegor]

  • Added delete-object view method to avoid redirection to confirmation_form [zegor]

  • Refactored codebase

    Moved code out of ./browser/browser.py into separate files.

    New directory structure:

    ./browser/viewlets viewlet templates ./browser/views content view templates ./browser/templates collage ui templates

    Zope 3 configuration files:

    configuration.zcml collage ui and functionality views.zcml content views actions.zcml ui actions (insert, split etc.) viewlets.zcml ui configuration

    [malthe]

  • Nested headings properly

    Lets have a ‘safe’ structure: <h1> title of the collage <h2> could be a row heading and / or object item http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/#tech-logical-headings

    [pelle]

  • Added HISTORY file

    Lets use this file again to log changes…

    [pelle]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Products.Collage-1.2.2.tar.gz (83.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page