import VSyncer from App.ImageFile import ImageFile def initialize(context): context.registerClass(VSyncer.VSSyncer, constructors = (VSyncer.manage_addVSServerForm, VSyncer.manage_addVSServer), icon='www/icon.gif') context.registerHelp() misc_ = {'stop.gif':ImageFile('www/stop.gif',globals()), 'checkedbox.gif':ImageFile('www/checkbox.gif',globals()) } # ok rummage through all the items to # import, Folder.manage_options is one, but # if you have custom folderish objects add them here from OFS.Folder import Folder from Globals import DTMLFile Folder.vsync=DTMLFile('dtml/VSyncFolder', globals()) m = list(Folder.manage_options) not_found = 1 # does the manage_options thing # already have this label? if not # add it. This aint perfect, since Sync # is not a unique name, but hey it works # for this for opt in m: if opt.get('label', '') == 'ZSync': not_found = 0 # so its not found, add it an # add to the options # security? thats an issue if not_found : m.append({'label':'ZSync', 'action':'zsync'},) Folder.manage_options = tuple(m)