[Zope] getitem('string') but with HTML
Kapil Thangavelu
kvthan@wm.edu
Tue, 08 Aug 2000 16:16:54 -0700
peter be wrote:
>
> I have a rather simple setup. And all I want to do is to show some news content, but with the way I'm doing it, the HTML is not parsed.
>
> /root
> index_html
> view_each_news_html
> /news
> news_001 (MS ruined!) # a DTML Document
> news_002 (Peter on killin spree) # a DTML Document
> ... # lots of DTML Documents
>
> Index_html lists all available news and that works fine. All I do is that I list the documents' title together with their bobobase_modification_time.
>
> Each news item is linked as <a href="/news_folder/view_each_news_html?newsID=<dtml-var id>"><dtml-var title></a>
why use getitem wouldn't an objectItems be more what you want.
from root in index_html
<dtml-in "news.objectItems(['DTML Document']">
<dtml-with sequence-item>
<a href="<dtml-var absolute_url>"><dtml-var title></a>
<dtml-var bobobase_modification_time>
</dtml-with>
</dtml-in>
OR
getitem takes an optional arg. on whether it should call the item or
just get a reference
try _.getitem(item, 1)
check the Zope Quick Reference for more info
http://www.zope.org/Members/ZQR
Cheers
Kapil