[Zope] DTMLMethod Question
Steve Spicklemire
steve@spvi.com
Mon, 7 Feb 2000 16:10:30 -0500 (EST)
How About:
<dtml-var "idOfTheDocument.raw[:sizeOfSlice]">
or maybe:
<dtml-var "idOfTheDocument(_.None, _)[:sizeOfSlice]">
depending on what you want....
-steve
>>>>> "James" == James W Howe <jwh@allencreek.com> writes:
James> I've got a folder which contains DTMLMethods which are used
James> to format a "news" article in a certain way. One of the
James> methods is responsible for actually displaying the article
James> contents, the others are responsible for generating various
James> navigational components. I'm now designing a new view
James> which is also going to display a news article, plus some
James> other stuff. The major difference is that this view is
James> only going to show a subset of information. I would like
James> to reuse the article display code but I'm not exactly sure
James> how to do it. What I would like to do is retrieve the
James> first N characters from a news article and then have my
James> method format it. Something like:
James> <dtml-var "formattingMethod(???, <dtml-var articleContent
James> size=500>)">
James> I'm not fluent enough in all the nuances of how you call a
James> DTMLMethod rather than get results via
James> reference/acquisition. I suppose I could pass the length
James> restriction as a parameter and if that parameter didn't
James> exist the full article would be retrieved. I would rather
James> simply pass the article contents and let the method format
James> what it is given.
James> Any help would be appreciated.
James> Thanks.