## Script (Python) "topicmap_base_locator_edit"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=REQUEST, RESPONSE
##title=Target method that sets the topicmap's base locator
##
from Products.PythonScripts.standard import url_quote

base_locator = REQUEST.base_locator
context.setBaseLocator(base_locator)

RESPONSE.redirect("%s/%s?portal_status_message=New+base+locator+set."%
                              ( context.absolute_url()
                              , context.getTypeInfo().getActionById('ztmedit')
                              )
                 )
return
