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

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to