Changeset 1105

Show
Ignore:
Timestamp:
04/07/08 09:37:16
Author:
piv
Message:

patched portal_url's getPhysicalPath

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qLocalSkin/trunk/__init__.py

    r1003 r1105  
    77    """ 
    88 
    9     # print '################################ Called pathed portal_url call: ' + self.REQUEST.URL 
     9    # print '################################ Called patched portal_url __call__: ' + self.REQUEST.URL 
    1010    url_suffix = '' 
    1111    if self.REQUEST: 
     
    1717    return self.getPortalObject().absolute_url(relative=relative) +  url_suffix 
    1818 
     19def urltool_getPortalPath(self): 
     20    """ Get the portal object's URL without the server URL component. 
     21    """ 
     22 
     23    url_suffix = '' 
     24    if self.REQUEST: 
     25        annotator = IRequestPortalUrlAnnotator(self.REQUEST, None) 
     26        if annotator is not None: 
     27            url_suffix = annotator.getPortalUrlSuffix() 
     28            # print '############ Added sufix to portal_url: ' + url_suffix 
     29 
     30    return '/'.join(self.getPortalObject().getPhysicalPath()) + url_suffix 
     31 
    1932URLTool.__call__ = urltool_call 
     33URLTool.getPortalPath = urltool_getPortalPath