Logo Search packages:      
Sourcecode: zope-emarket version File versions

def EMarket::EMarket::EMarket::constructCookieURL (   self,
  REQUEST,
  parents,
  path 
)

construct cookie-root URL 

Definition at line 703 of file EMarket.py.

00703                                                         :
        """ construct cookie-root URL """
        
        foundIndex = -1  # nothing found yet...
        
        for index in range(len(parents)):
            item = parents[index]

            if item.meta_type == 'EMarket':
                foundIndex = index
                break
        
        if REQUEST.has_key('SCRIPT_NAME'):
            path = REQUEST['SCRIPT_NAME'] + path

        while path[0]=='/': path=path[1:]
        while path[-1]=='/': path=path[:-1]
        path=string.split(path,'/')[:-1]

        if foundIndex == 0:
            newPath = path
        elif foundIndex == -1:
            raise EMarketError  # there was no object with the given meta_type.
        else:
            newPath=path[:-foundIndex]

        return '/' + string.join(newPath,'/') 

    def getShopper(self, shopperID):


Generated by  Doxygen 1.6.0   Back to index