[Zope] DTMLMethod Question
James W. Howe
jwh@allencreek.com
Mon, 07 Feb 2000 14:05:27 -0500
I've got a folder which contains DTMLMethods which are used to format a
"news" article in a certain way. One of the methods is responsible for
actually displaying the article contents, the others are responsible for
generating various navigational components. I'm now designing a new view
which is also going to display a news article, plus some other stuff. The
major difference is that this view is only going to show a subset of
information. I would like to reuse the article display code but I'm not
exactly sure how to do it. What I would like to do is retrieve the first N
characters from a news article and then have my method format
it. Something like:
<dtml-var "formattingMethod(???, <dtml-var articleContent size=500>)">
I'm not fluent enough in all the nuances of how you call a DTMLMethod
rather than get results via reference/acquisition. I suppose I could pass
the length restriction as a parameter and if that parameter didn't exist
the full article would be retrieved. I would rather simply pass the
article contents and let the method format what it is given.
Any help would be appreciated.
Thanks.
James W. Howe mailto:jwh@allencreek.com
Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html
Ann Arbor, MI 48103