## Script (Python) "FileListTabs" ##bind container=container ##bind context=context ##bind namespace=_ ##bind script=script ##bind subpath=traverse_subpath ##parameters=target="right" ##title=Filelist for Tabs ## """ FileListTabs.py This script creates tabs for each object in the current folder. For this script to function properly, the dtml-method "MakeTabs" must be available from the current context. """ # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE tabs=[] for object in context.objectValues(): # if(object.hasProperty('ShowTab') or object.hasProperty('TabLabel') ): # get tab label label = object.getProperty('ShowTab',d=object.title) if label==None: label = object.id; tabs.append( {'label' : label, 'action': object.id , 'target': target} ) return context.MakeTabs(RESPONSE=RESPONSE,REQUEST=request,tabs=tabs)