Skip to main content

Introduction

This package provides portlet which extends plone collection portlet in order to allow assigning different views for each newly created portlet through it’s edit form.

This is often required to have many collection portlets displaying different information in different places. Plone portlets provide us with portletRenderer directive which in general is really usefull, but it’s not an option because it overrides portlet renderer globally thus allowing to have only one template at a time.

Thus to avoid having some odd conditions in your collection portlet’s template NGCollection extends standard plone collection portlet with a template field where you can select template to use from available templates.

Apart from the ‘template’ field NGCollection portlet also adds ‘show_more_label’ field. This field is here to override default collection’s portlet ‘More…’ link text with some custom one entered by user.

Portlet Templates

In order to register new alternative templates for your portlet this package provides portletTemplates directive:

<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:plone="http://namespaces.plone.org/plone">

  <include package="collective.portlet.ngcollection" file="meta.zcml" />

  <plone:portletTemplates
      interface="path.to.some.portlet.assignment.Interface"
      directory="alternative_templates"
      />

</configure>

In this example we register templates contained inside alternative_templates folder as alternative templates available for path.to.some.portlet.assignment. Interface portlet. Thus you’ll be able to select one of them on portlet edit form via Plone interface.

You can register more than one directory for your portlet.

This idea with registering directories with custom templates was highly inspired by z3c.jbot package.

Contributors

  • Vitaliy Podoba

  • Roman Kozlovskiy

  • Volodymyr Cherepanyak

Changelog

1.1 (2011-08-19)

  • fixed filesystem path binding

1.0 (2011-08-08)

  • long overdue release

0.1 (xxxx-xx-xx)

  • Initial release

Download files

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

Source Distribution

collective.portlet.ngcollection-1.1.zip (31.7 kB view details)

Uploaded Source

File details

Details for the file collective.portlet.ngcollection-1.1.zip.

File metadata

File hashes

Hashes for collective.portlet.ngcollection-1.1.zip
Algorithm Hash digest
SHA256 ca33b2c010b049484afa2a8e4cc53a278b5359b87c8010918be09bd73aa87c68
MD5 049207c54215191b3b03d7cc316cf454
BLAKE2b-256 1f7c81504894a774cd3d664e16cc097d91520bdf4e04c876d0a94542720219d0

See more details on using hashes here.

Supported by

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