source: products/qLocalSkin/trunk/__init__.py @ 1

Last change on this file since 1 was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 759 bytes
Line 
1from Products.CMFPlone.URLTool import URLTool
2
3from adapters.interfaces import IRequestPortalUrlAnnotator
4
5def urltool_call(self, relative=0, *args, **kw):
6    """ Get by default the absolute URL of the portal. If request is annonated then add suffix to portal_url
7    """
8
9    # print '################################ Called pathed portal_url call: ' + self.REQUEST.URL
10    url_suffix = ''
11    if self.REQUEST:
12        annotator = IRequestPortalUrlAnnotator(self.REQUEST, None)
13        if annotator is not None:
14            url_suffix = annotator.getPortalUrlSuffix()
15            # print '############ Added sufix to portal_url: ' + url_suffix
16
17    return self.getPortalObject().absolute_url(relative=relative) +  url_suffix
18
19URLTool.__call__ = urltool_call
Note: See TracBrowser for help on using the repository browser.