Extends plone collection portlet in order to allow assigning different views for each newly created portlet through it's edit form
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.
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.
- Vitaliy Podoba
- Roman Kozlovskyi
- Volodymyr Cherepanyak
- Fixed compatibility with Plone 5 [kroman0]
- Added z3cform portlet edit support [kroman0]
- Added French translations from transifex, thanks Marc Sokolovitch [kroman0, msoko]
- Fixed unexpected keyword argument error [kroman0]
- Fixed compatibility with Plone 4.3.x [kroman0]
- Fixed import deprecation and removed unused imports [mborch]
- fixed filesystem path binding [mylanium]
- long overdue release
- Initial release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|collective.portlet.ngcollection-1.5.zip (42.0 kB) Copy SHA256 hash SHA256||Source||None||Oct 27, 2015|