[Zope] ZPT reading a file

Jay Dorsey jay at jaydorsey.com
Thu Nov 27 13:13:34 EST 2003


This is probably a simple task, but its giving me a heck of a time.  

I've got a folder with some files in it.  I'm using a PageTemplate to
loop through the folder and pull the attributes of the templates out.
I've got something like this:

<div tal:repeat="item sorted_objects">
	<div tal:content="item/title">title here</div>	
	<div tal:content="item/title">author here</div>	
	<div tal:content="structure item">content here</div>	
</div>

The PageTemplates originally contained HTML, but I'm not so 
stuck on it that I can't use Structured Text instead (it doesn't 
seem to me that there is an html option for tal:content tags). 
Regardless of whether I use "structure" or "text", the content 
comes back as text when I view the page.

I'm assuming this is because I'm accessing the item incorrectly.

What would be the easiest way to get the content out of each item 
and use either structured text or just keep the HTML as well?

Zope is just killing me right now--if this was plain ol' python I 
would have a look at dir(item) to see if there was a  special 
attribute or method I needed. Thankfully I'm just learning zope on
my own time, else I'd feel horribly useless instead of only 
terribly so ;-)

The documentation seems lacking on the website, and on the net in 
general, as far as basic "heres how you do X" goes.  Zopelabs is 
good, and one or two other sites I've found, but I know this 
has to be a really easy task.  I appreciate any assistance.

-- 
Jay Dorsey
jay at jaydorsey dot com



More information about the Zope mailing list