25 Mar
2001
25 Mar
'01
1:58 a.m.
You've got the string calling wrong. String.split() is a "builtin" python module for DTML. You call it by _.string.split() Besides... python syntax: '/'[-1] == '/'[0] == '/' == / Besides you haven't declare string as builtin with the _. <dtml-call "REQUEST.set('url_as_list',_.string.split(URL,'/'))"> Last objectid in URL: <dtml-var "url_as_list[-1]"> Or simpler: <dtml-var expr="_.string.split(URL,'/')[-1]"> ----- Original Message ----- From: "Junk" <junk@gargl.net> To: "Peter Bengtsson" <peter@grenna.net> Sent: Friday, March 23, 2001 6:57 PM Subject: RE: [Zope] url question...
string.split(URL,'/')[-1]
why can't i do <dtml-var expr="string.split(URL,'/'[-1])"> ???
junk