Richtext/HTML Description field for Archetypes
Project description
Introduction
Adds the new html-formatable textfield “richdescription” to Archetypes based content types and hides the description field from ExtensibleMetadata. When the field is saved, the contents are also stored in the “description” field, but without html-formating. A Metadata index is provided, so that “richdescription” can be used with catalog brains. There is no folder_listing template yet, but if you want to have HTML formated descriptions in folder_listing, then use something like this:
<tal:block tal:define="item_description item/richdescription|nothing; item_description python:item_description or item.Description;"> <p class="akaDescription" tal:condition="item_description" tal:content="structure item_description">DESCRIPTION</p> </tal:block>
Warning
Although there are no big issues with this package, use it at your own risk! The description field wasn’t meant to hold HTML data. People may tend to write long essays in the description field, which is not what you want, probably. Some use cases require this functionality though, so have fun.
Migration?
There should be no need for a specific migration step. When no richdescription field is available for a content type, it falls back to the normal description field. When saving a content type, the richdescription field is set and the catalog’s metadata richdescription column is filled.
Compatibility
Tested with Plone 4
Changelog
1.0.1 (2014-06-13)
Metadata update. [thet]
1.0 (2012-11-07)
Initial release [thet]
1.0pre
When no description is set, return a BaseUnit as fallback. Fixes AttributeError, where original_encoding was tried to accessed on a string value. [thet]
Register the skins folder for any theme. [thet]
Initial version on 2010-10-05 for sfd.at.
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
Hashes for collective.richdescription-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7712f155f27ae0adce4e7e87dfaa2df361f2a9886ba667d52ff67ea6777da423 |
|
MD5 | cc01a667c23d25377cdb98813384518f |
|
BLAKE2b-256 | c369fee8bac11f69d2a492c63049052a286d16626901e5bac18ab98533d6c275 |