understanding wicked

Raphael Ritz r.ritz at biologie.hu-berlin.de
Tue Nov 20 13:35:47 UTC 2007


Dominik Ruf wrote:
> Hi Raphael,
> 
> thanks again for our hint. In CMFBibliographyAT I saw that I can use
> a
> policy to transform content by using text/x-html-safe as target.
> 
> But is there a way to use more than one transforms.
> 

Of course you can. That's what transformation chains are for.

First define a transformation chain that puts together all
your custom transforms and then register that chain in the
policy.

HTH,

	Raphael


> In my case I'd like to a one transform to change #1, etc. into
> bugzilla links
> and one transform to change [1], etc. into svn links.
> 
> When I tried to add a second policy I got:
> 
> TransformException: A policy for output text/x-html-safe is yet
> defined
> 
> On 19 Nov., 13:21, Raphael Ritz <r.r... at biologie.hu-berlin.de> wrote:
>> Dominik Ruf wrote:
>>> Hi,
>>> I'd like to create a Product that replaces #1, #21, etc. in a plone
>>> pages with a link to our bugtracking system. The some as in trac :-)
>>> Wicked does something similar: ((testpage)) becomes a link to
>>> testpage.
>>> I looked at the sources of wicked but since it does much more than
>>> just replacing the brackets it is quite complicated to understand.
>>> Can someone give me a tip how this replacing works or where I can find
>>> some help?
>> This should be a simple regex exercise.
>>
>> You can hook this up via portal transforms.
>>
>> If you want to see a different example look
>> for CMFBibliographyAT where I use this to
>> support LaTeX/BibTeX like reference handling
>> (i.e., \cite{Foo2007} gets replaced with a like
>> to the appropriate reference ...)
>>
>> Raphael
>>
>> _______________________________________________
>> Product-Developers mailing list
>> Product-Develop... at lists.plone.orghttp://lists.plone.org/mailman/listinfo/product-developers





More information about the Product-Developers mailing list