Doing Python-ish things in Zope...
How might I reference the first x characters of a title_or_id? I tried the Python-ish <!--#if expr="id[0:2] != 'zzz'"--> and that clearly didn't work. Maybe I'm barking up the wrong tree. I'd like to be able to store all of my resources (images and things I haven't even thought of yet) away from the real content. My old-school Web development thinking says build a hidden directory and stuff them all in there. That works well until I try to stay tidy and add subdirectories. I renamed my resource directory 'zzz' but when I put, say, an 'img' folder in it, the 'zzz' directory doesn't show up on the tree but the 'img' folder does. Any clues? Thanks! Jules
On Mon, 7 Jun 1999, Zope on a Rope wrote:
I tried the Python-ish
<!--#if expr="id[0:2] != 'zzz'"-->
and that clearly didn't work.
you can try: <!--#if expr="title[0:2] != 'zzz'"--> use id() if you want to check against the id of the object
That works well until I try to stay tidy and add subdirectories. I renamed my resource directory 'zzz' but when I put, say, an 'img' folder in it, the 'zzz' directory doesn't show up on the tree but the 'img' folder does.
Any clues?
I am not sure I understand what the problems is. I have a similar structre as yours and I basically do: <!--# var "zzz.img.arrow.absolute_url()"--> and it works fine. If this is of no help can you give us some more info? PAVLOS
participants (2)
-
Pavlos Christoforou -
Zope on a Rope