All pastes #36212 Raw Edit

Stuff

public text v1 · immutable
#36212 ·published 2006-01-08 23:52 UTC
rendered paste body
# Create with a random id
newId = context.generateUniqueId('Folder')

# Create an object of type Folder
context.invokeFactory(id=newId, type_name='Folder')
newFolder = getattr(context,newId)

# create a new Document type
newFolder.invokeFactory(id='index.html', type_name='Document')

# get the new page
newPage = getattr(newFolder, 'index.html')
newPage.edit('html', '<p>This is the default page.</p>')

# return something back to the calling script
return "Done"