Wicked (1.0)
- Wicked download link: http://plone.org/products/wicked/releases
- Homepage of Wicked: http://plone.org/products/wicked/
- Wicked repository: http://svn.plone.org/svn/collective/wicked/
- Description source: http://plone.org/products/wicked/
Wicked is a framework addition to Archetype to allow developers to add wiki-ish behavior to AT content objects via a schema field.
Guiding Principles
- Easy link based creation of content
- Easy intuitive linking of content by explicit wiki links
- Simple reference system for relating interlinked content (ie. backlinks)
- Wiki style linking should not be limited to a single content type
Examples
Wicked ships w/ two example content types. Please note, these are examples for demonstration purposes only. These examples may be installed using Plone's product installation facility.
IronicWiki -- A barebones content type consisting of a single WikiField using
WickedDoc -- A subclass of ATCT Document using a WikiField for it's primary field
Field
The WikiField is the emphasis of the product. Take it and use it in you're own product type. Subclass it. Patch over ATCT's document's schema with it. This is what Wicked is about.
Linking
The Wicked is wicked simple. All links are specified by enclosing content text in double parentheses. ex:
((This is a wicked link))
A wicked link will resolve upon rendering of the field under one of the following conditions:
- a matching id within the same folder
- a matching title within the same folder
- a matching id somewhere else in the site
- a matching title somewhere else in the site
In cases where there are duplicate matches (possible w/ 2, 3, or 4), then the earliest created piece of content will be considered to match. Id matches are case sensitive, title matches are not.
Content Generation
An unresolved Wicked link will generate an add link in the form of a plus sign ("+") after the Wicked link text. Clicking on this link will create a new piece of content of the same type as the document being viewed, in the same folder.
Filter
Wicked depends on the 'filter' product (see REQUIREMENTS.txt), based on Ben Saller's filters in Bricolite. 'filter' is a framework piece for constructing and managing filters that can be applied to transform text field values in a context aware fashion upon rendering.
The Wicked filter may be used separately from Wicked w/ FilterField and chained with other filters.
Advanced
Added types
By default, wicked add-links will create content of the same type as the content within which the Wicked link resides. Hooks allow for creation of other content types.
Scope
If a Wicked link doesn't resolve in the current folder, then the portal catalog is searched for a possible match.
If the scope property on the field is set to a path, the link resolution outside of the folder will is limited to levels below said path. See the unit tests in the 'test_wickedscope.py' file for more information