How to use at_post_create_script to with multi-schemata content types

When using at_post_create_script to hook up in the "post creation" events of AT, if the content type has multiple schematas, the script will be called each time the "next" button is pushed.

To properly use the script, a check can be added to see if the "save" button was pressed:

security.declarePrivate('at_post_create_script')
def at_post_create_script(self, **kwargs):
    if self.REQUEST.get('form_submit', None) == 'Save':
        pass   #do something here

       

Comments