Replace some code of the Plone collection portlet to add links color
Project description
Introduction
Change the renderer of your Plone collection portlet, trying to force a link color using a style="color: ..." attribute.
How to use
This product is for developers. It only add a catalog column (color) and change the basic Collection Plone renderer to check for this color.
Installing this won’t add any real new colors in collection portlets (and we don’t want … normally color must came from site UI theme, not contents).
How support colors
You can:
- Support for a color property
Add to your content types a new color method or property.
- Support for a color @indexer
Add an indexer that return the color you want:
>>> from plone.indexer.decorator import indexer >>> @indexer(IMyType) >>> def color(object, **kw): ... return 'red'
See Custom indexing strategies on Plone documentation section.
The color format must be CSS valid. So: ‘red’, ‘#FF0000’, ‘#F00’ or ‘rgb(255,0,0)’ are all good values.
Credits
Developed with the support of S. Anna Hospital, Ferrara; S. Anna Hospital supports the PloneGov initiative.
Changelog
0.1.0 (2011-12-16)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for collective.portlet.colorcollection-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2fa5d11ea18ccadbfeb08e91db898349138dd6112308fc724000c3c224f1da5 |
|
MD5 | 1e4e878a34810095079e36bea66a2df9 |
|
BLAKE2b-256 | 124437841f37c978e63140f85ec2c0afcfc0a9dff2d4c68f22b9d07a5134e128 |