[Zope] Render a string as tal

Chris Withers chris at simplistix.co.uk
Fri Nov 18 04:04:37 EST 2005


Alan Warren wrote:
> single image into a folder.  So, I have a folder called view.  When an
> image is viewed the URL looks like
> /some_album/some_pic.jpg/view/?display=large
> 
> The code looks like this:
> <span tal:define="imgName python:request['URL2'][len(request['URL3']+1:]">
>     <span tal:define="global imgObj python:path('here/'+imgName)"></span>
> </span>

ouch.

This is really contorted. Why do you use URL2 and URL3?

Is imgObj not just 'here' anyway?

What is the page template where this code comes from called?

Why do you do a global define?

Why two define statements instead of just one?

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope mailing list