[CMF-checkins] CVS: CMF/CMFCore/interfaces - portal_skins.py:1.6
Shane Hathaway
shane@cvs.zope.org
Thu, 22 Aug 2002 13:45:54 -0400
Update of /cvs-repository/CMF/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv15832/interfaces
Modified Files:
portal_skins.py
Log Message:
Merged runyaga's skinnable changes: there is now a changeSkin() method on
the portal object. Use it to change skins mid-request. Note that this
has always been possible to do, but not fully supported.
Also moved getSkin() from SkinsContainer to Skinnable to simplify the
implementation of changeSkin(), and updated the portal_skins tool interface.
=== CMF/CMFCore/interfaces/portal_skins.py 1.5 => 1.6 ===
--- CMF/CMFCore/interfaces/portal_skins.py:1.5 Thu Aug 1 15:05:12 2002
+++ CMF/CMFCore/interfaces/portal_skins.py Thu Aug 22 13:45:53 2002
@@ -22,17 +22,38 @@
'''
id = Attribute('id', 'Must be set to "portal_skins"')
- # getSkin__roles__ = () # Private
- def getSkin(request):
- '''
- Returns the requested skin object as a tuple:
- (skinob, skinpath). Note that self will not normally
- be wrapped in acquisition, but the request variable is
- provided so it is possible to access the REQUEST object.
- '''
+ # Private
+ def getSkinPath(name):
+ """Converts a skin name to a skin path.
+ """
- # getSkinSelections__roles__ = None # Public
+ # Public
+ def getDefaultSkin():
+ """Returns the default skin name.
+ """
+
+ # Public
+ def getRequestVarname():
+ """Returns the variable name to look for in the REQUEST.
+ """
+
+ # Private
+ def getSkinByPath(path, raise_exc=0):
+ """Returns a skin at the given path.
+
+ A skin path is of the format:
+ 'some/path, some/other/path, ...' The first part has precedence.
+
+ A skin is a specially wrapped object that looks through the layers
+ in the correct order.
+ """
+
+ # Private
+ def getSkinByName(name):
+ """Returns the named skin.
+ """
+
+ # Public
def getSkinSelections():
- '''
- Returns the sorted list of available skin names.
- '''
+ """Returns the sorted list of available skin names.
+ """