[Zope] Using pythonbased products (rbickers Photo) from Page Templates

Jochen Haeberle listen@midras.de
Mon, 2 Sep 2002 23:45:29 +0200


Hi,

I am banging my head against the wall trying to figure out how I 
would best use rbickers Photo-Product from Page Templates, but I 
guess the problem is the same for any Zope-Product that does not come 
with ZPT-Support out of the box.

I guess, one can use the Photo product without any real problem, for 
example, I can do

<a Href="#" tal:attributes="href string:${my_batch/id}/view">
   <img src="image.jpg" tal:attributes="src 
string:${my_batch/id}?display=thumbnail">
</a>

to show the thumbnails of my Photos and link to the "view" method, 
but is this really TAL???

I am able to call some methods on the PhotoObjects as well like

<ul>
   <li tal:repeat="displays here/displayLinks" tal:content="structure 
displays">Link to a size</li>
</ul>

To get the links to different size-links...

...but how would I express

<dtml-var "tag(display=REQUEST.get('display', 'small'), border=0, cookie=1)">

in TAL to get the cookie-enabled version of the Photo???


In general, what's the best way to learn how to use existing products 
in Templates??


Thanks in advance

Jochen