[Zope] Structured Text

Andreas Jung Andreas Jung" <andreas@zope.com
Wed, 13 Mar 2002 11:20:23 -0500


----- Original Message -----
From: "Tom Deprez" <tom.deprez@uz.kuleuven.ac.be>
To: "Andreas Jung" <andreas@zope.com>; <zope@zope.org>
Sent: Wednesday, March 13, 2002 11:16
Subject: Re: [Zope] Structured Text


> > > Hi,
> > >
> > > Does somebody has experience with modifying STX in such a way that it
> only
> > > effects some parts of the Zope Tree?
> >
> > What do you mean with that ?
>
> Well, if I change it in the python file of STX in the zope directory, then
> all the STX documents which contain images will all have the same width
and
> height and all contain a link. This is not the intention. So, I was
> wondering if it was possible to use an external method in a certain folder
> and from that folder on all the STX documents would be rendered in such a
> way.
>

Use an external method that fulfills your needs and then call this method
from DTML as needed.

> > > ie. I'm looking for a way to make STX showing pictures (I managed
that),
> > but
> > > I want to make it so that all pictures have the same width and height
> > > (independend on the real height/width of the picture) and a link when
> > > clicked on the image so that the full image can be shown....
> >
> > Take a look at the HTML() function in StructuredText.py (CVS trunk).
> > This function uses HTMLWithImages() to render STX with images. You could
> > subclass HTMLWithImages and adjust the HTML generation to your needs.
>
> Thanks, but this would imply that I change it in the .py file in the zope
> directory, not? So all the stx documents would behave like that...
>

Jup, see above for the solution.

-aj