--- zogiLib/zogiLib.py 2007/05/04 14:20:42 1.68 +++ zogiLib/zogiLib.py 2010/04/09 18:32:31 1.71 @@ -187,6 +187,7 @@ class zogiLib(Folder): main_book = PageTemplateFile('zpt/main_book', globals()) main_image = PageTemplateFile('zpt/main_image', globals()) main_metaData = PageTemplateFile('zpt/main_metadata', globals()) + main_embed = PageTemplateFile('zpt/main_embed', globals()) #main_static = PageTemplateFile('zpt/main_static', globals()) options = PageTemplateFile('zpt/options', globals()) #changeForm = PageTemplateFile('zpt/changeForm', globals()) @@ -358,7 +359,7 @@ class zogiLib(Folder): return {} - def zogilibPath(self, otherbase=None): + def zogilibPathOLD(self, otherbase=None): """returns an URL to the zogiLib instance""" url = self.REQUEST['URL1'] # should end with "/" @@ -373,6 +374,20 @@ class zogiLib(Folder): url += '/' return url + def zogilibPath(self, otherbase=None): + """returns an URL to the zogiLib instance""" + url = self.absolute_url() + # should end with "/" + if len(url) > 0 and url[-1] != '/': + url += '/' + if type(otherbase) is str: + url += otherbase + else: + url += self.basePath + # should still end with "/" + if len(url) > 0 and url[-1] != '/': + url += '/' + return url def zogilibAction(self, action, otherbase=None): """returns a URL with zogilib path and action""" url = self.zogilibPath(otherbase) @@ -464,7 +479,7 @@ class zogiLib(Folder): # make shure to remove unused parameter del self.REQUEST.SESSION['scalerDiv'] - pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/zogilib_img_div')).__of__(self) + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/img_div')).__of__(self) return pt() def index_html(self):