13 Dec
2002
13 Dec
'02
6:14 p.m.
On Fri, Dec 13, 2002 at 05:31:38PM +0100, Jerome Alet wrote:
create a Script (Python) object named itemcode in your root which contains only :
return context.getId().split('.')[-1]
that'll break the first time somebody uploads a file named "foo.bar.baz.html" ... instead try (untested): import string name = context.getId() splitname = id.split('.') splitname.pop() # get rid of the extension name = string.join(splitname, '.') # reassemble the string return name -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!"