[Zope] File referencing and LocalFS
Dieter Maurer
dieter@handshake.de
Wed, 5 Jul 2000 21:49:43 +0200 (CEST)
Rogerio Atem de Carvalho writes:
> I am using LocalFS to refer to a directory structure
> like this:
>
> folder1
> |
> folder11
>
> There are image (.jpg) files in both folders. I have
> two questions about this:
>
> 1)Folders names are directly related to string fields
> in a MySQL database which use spaces between words (eg
> New York), but folders names don't use spaces (eg
> NewYork). How can I skip spaces from database fields to
> make them refer to these folders (eg New York -->
> NewYork)?
<dtml-var "_.string.replace(name_from_mysql,' ','')">
gives you the folder name.
<dtml-with "_[_.string.replace(name_from_mysql,' ','')]">
"opens" the folder object.
You now can use "<dtml-var id>" to access the object with name *id*
in the folder.
Dieter