[Zope-CMF] Re: Changing the H level in STX
Tonico Strasser
contact_tonico at yahoo.de
Wed Apr 21 07:37:17 EDT 2004
Tres Seaver wrote:
> Strategies:
>
> - Derive a new class and override the default '_stx_level'::
>
> <untested should_work="1">
>
> from Products.CMFDefault.Document import Document
> class FussilyCorrectDocument( Document ): # ;)
> _stx_level = 2
> </untested>
>
> Then, register your new class in place of the "stock" document.
>
> - You could arrange to tweak the level directly on the instance,
> e.g. via an ExternalMethod calling 'handleText' (which happens
> to be private for reasons which escape me right now).
>
> - You could override the level by passing your own value to the
> 'CookedBody' method. Note that this defeats the caching done
> by "cooking" the text when it is saved, which makes it a less
> efficient solution; nevertheless, you can implement it today
> just by customizing the 'document_view' template.
Thanks, I'll try this.
Any chance for a 'default_stx_level' property to be added to CMF 1.5,
maybe as a site property? Or to change the default level to 2?
Tonico
More information about the Zope-CMF
mailing list