Skip to main content

A Plone product that change the standard Plone behaviour of the views menu

Project description

Products.ATCustomizableView

Overview

A simple Plone product based on monkeypatch to enhance a little the basic Plone control on the default view of contents. Applying some Zope properties to contents you can enhance (or limit) the power of users able to manage views.

For every content of the portal you can block the user ability to change layouts on a single document/folder, instead of having this feature only for the whole content-class. This is simply done adding a new boolean property (fixed_layout) set to True. When this is done, users can’t change the default view (or select folder contents as default view) on this object. Removing this property (or set this to False) will restore normal behaviour.

Again, you can add custom, addition view to a single content. You only need to a new (lines) property called fixed_additional_layouts to the content. Every additional views on this list will be added to basic views avaiable.

Of course you can block and not inherits default views but use only the news ones. To do this just add another (boolean) property called purge_basic_layouts and set it to True.

All those features can be very useful on many Plone sites.

  • You can set a (non standard?) view to a single content and make the user not able to change your choice.

  • You can force a stardard view on a content, but again make users not able to change this.

  • You can develop a new view compatible with some content type, but can choice to not make it avaiable for all content types of the portal. Instead of force this new view to the content you can leave again the choice to the power user that normally manage the “views” menu.

Without this product, too often a Plone developer is forced to develop new, silly content types just for only provide different views policy.

Requirements

Monkeypatch approach is dangerous, collective.monkeypatcher is now required in your buildout.

[instance]
...
eggs =
    ...
    Products.ATCustomizableView
    collective.monkeypatcher
    collective.monkeypatcherpanel
...

zcml =
    ...
    Products.ATCustomizableView
    collective.monkeypatcher
    collective.monkeypatcherpanel
...

Tutorial

This first version of the product has been written related to a tutorial on Plone.it (italian language!).

TODO

  • What about leave the old ZMI property approach and move to some other technology like Zope3 interfaces, annotations, ?

  • In any case give to the user a Plone form for managing per-object configuration.

Changes

0.2.0

  • Forget Plone 2.5 support.

  • No more ugly-old-style monkey patch, but now collective.monkeypatcher is required. [keul]

  • Added controls on selectable views. [keul]

0.1.0

  • Initial releases

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.ATCustomizableView-0.2.0.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

Products.ATCustomizableView-0.2.0-py2.4.egg (11.2 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