import os from scaffold.web import www class control(www.default.html_ui): """Image cycle widgets""" view=[] buttons=[] content=[] count=0 offset=60 height=300 width=400 with open(os.path.abspath('./widgets/banner_slider.js')) as fp: script = [fp.read()] #~ def javascript(self): #~ return fp.read() #~ self.script.append() def create(self): self.reset() def reset(self): self.view=[] self.buttons=[] self.content=[] def append(self,image,link,title,intro=''): htm = u'
%s
%s
'%(link,image,title,intro) self.content.append(htm) def render(self): #~ self.script.append(self.javascript()) self.count+=1 htm = u'
' return htm