Personal tools
You are here: Home Software Scripts Generate URL-firendly IDs for existing Plone objects Generation XML
Document Actions

Generate URL-firendly IDs for existing Plone objects

Sometimes you end up with Plone objects with names like "organization.2007-01-12.024642" this script runs them through the machinery that uses the title content to generate a more readable ID

for item in context.getFolderContents():
    obj = item.getObject()
    nicetitle = obj.generateNewId()
    obj.setId(nicetitle)
    obj.reindexObject()

    print nicetitle

return printed