Commit e00083df authored by Jean-Paul Smets's avatar Jean-Paul Smets

Extended API of getDocumentValue so that filtering is possible.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13323 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b80da4ef
......@@ -264,7 +264,7 @@ class WebSection(Domain):
# WebSection API
security.declareProtected(Permissions.View, 'getDocumentValue')
def getDocumentValue(self, name=None, portal=None):
def getDocumentValue(self, name=None, portal=None, **kw):
"""
Return the default document with the given
name. The name parameter may represent anything
......@@ -275,6 +275,9 @@ class WebSection(Domain):
to returning the default document by calling
getDefaultDocumentValue.
kw parameters can be useful to filter content
(ex. force a given validation state)
This method must be implemented through a
portal type dependent script:
WebSection_getDocumentValue
......@@ -297,7 +300,7 @@ class WebSection(Domain):
if cache is not None:
if not cache.has_key(key): cache[key] = method
return method(name, portal=portal)
return method(name, portal=portal, **kw)
security.declareProtected(Permissions.View, 'getDefaultDocumentValue')
def getDefaultDocumentValue(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment