Re: [Zope] Doing Python-ish things in Zope...
Thanks for the zippy reply. At 04:03 PM 6/7/99 -0400, Pavlos Christoforou wrote:
On Mon, 7 Jun 1999, Zope on a Rope wrote: <!--#if expr="title[0:2] != 'zzz'"-->
Now that worked like a charm. Cheers!
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.
As it did for me. Good tip and thank you!
If this is of no help can you give us some more info?
Please have a squint at the small graphic I've attached. Hopefully that'll explain it a bit better. I've temporarily renamed the title to show up. If I do change it back to start with 'zzz', it's hidden but the problem is the tree +/- still shows up. Thinking NT-like or -- gasp! -- Lotus Domino-like, is it possible to set an access control entry on a folder like this so anonymous users won't see it at all? A better solution maybe? Thanks! Jules
Zope on a Rope wrote:
Thanks for the zippy reply.
At 04:03 PM 6/7/99 -0400, Pavlos Christoforou wrote:
On Mon, 7 Jun 1999, Zope on a Rope wrote: <!--#if expr="title[0:2] != 'zzz'"-->
Now that worked like a charm. Cheers!
But if my Python is correct this will *always* be false as title[0:2] will get you title[0] and title[1] in a string, 2 characters. This is always something other than 'zzz', obviously. :) Just thought I'd point this out! Regards, Martijn
On Tue, Jun 08, 1999 at 11:16:06AM +0200, Martijn Faassen wrote: |Zope on a Rope wrote: |> |> Thanks for the zippy reply. |> |> At 04:03 PM 6/7/99 -0400, Pavlos Christoforou wrote: |> >On Mon, 7 Jun 1999, Zope on a Rope wrote: |> ><!--#if expr="title[0:2] != 'zzz'"--> |> |> Now that worked like a charm. Cheers! | |But if my Python is correct this will *always* be false as title[0:2] |will |get you title[0] and title[1] in a string, 2 characters. This is always |something other than 'zzz', obviously. :) | |Just thought I'd point this out! <blush>You are indeed correct.</blush> My fingers were engaged but my brain unfortunately was not in gear. I spotted the foul up after I sent the mail. Doh! -- Now I lay me down to sleep, I pray the firewall will keep, may no cracker through my network break, a no one smurf me 'till I wake.
On Tue, 8 Jun 1999, Martijn Faassen wrote:
Zope on a Rope wrote:
Thanks for the zippy reply.
At 04:03 PM 6/7/99 -0400, Pavlos Christoforou wrote:
On Mon, 7 Jun 1999, Zope on a Rope wrote: <!--#if expr="title[0:2] != 'zzz'"-->
Now that worked like a charm. Cheers!
But if my Python is correct this will *always* be false as title[0:2]
Of course your Python is correct! Thanks for noting it: it should be : <!--#if expr="title[0:3] != 'zzz'"--> Pavlos
participants (4)
-
Martijn Faassen -
Pavlos Christoforou -
Zope on a Rope -
zope@jules.com