6 Sep
2005
6 Sep
'05
7:07 a.m.
Peter Bengtsson wrote:
easy: <dtml-let strDirPath="'/'.join(strDirPath.split('/')[:-1])"> You don't need to use _.string.legacy() functions. Just put your python expression inside the quotation marks. If you're new to python, don't let DTML be your place to learn python. Use a nice editor like IDLE.
Just to emphasise what Peter is saying: do this in ZPT and put the logic in a python script. You'll suffer a lot less in the long run as a result ;-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk