Changeset 1003

Show
Ignore:
Timestamp:
11/23/07 05:36:48
Author:
piv
Message:

release 0.1.0

Files:

Legend:

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

    r1001 r1003  
     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 
  • qLocalSkin/trunk/configure.zcml

    r1001 r1003  
    22           xmlns:five="http://namespaces.zope.org/five"> 
    33 
    4     <!-- marker interface for shift Portal URL to merked folder --> 
    5     <interface  
    6         interface=".interfaces.IShiftPortalUrl" 
    7             /> 
    8     <!-- provide security for adapter class --> 
    9     <class class=".localPortalState.LocalPortalState"> 
    10         <require 
    11             permission="zope2.View" 
    12             interface="plone.app.layout.globals.interfaces.IPortalState" 
    13                 /> 
    14     </class> 
     4    <include package=".browser"/> 
     5 
     6    <include package=".adapters"/> 
     7 
     8    <include file="events.zcml"/> 
     9 
     10    <!-- marker interface for shift Portal URL to marked folder --> 
     11    <interface interface=".interfaces.IShiftPortalUrl" /> 
    1512 
    1613</configure>