Commit 2da8eba7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

define getWebSiteValue() and getWebSectionValue() in Folder.

    Since aq_dynamic will not work well to get Web Site / Web Section
    for language specified case
    (eg. web_site_module/site/fr/section/web_page_module), we call
    aq_parent instead to reach the Web Site / Web Section.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28326 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 77f46443
......@@ -341,6 +341,25 @@ class FolderMixIn(ExtensionClass.Base):
"""
return self.countFolder(**kw)[0][0]
security.declareProtected(Permissions.AccessContentsInformation,
'getWebSiteValue')
def getWebSiteValue(self):
"""
Since aq_dynamic will not work well to get Web Site for language
specified case (eg. web_site_module/site/fr/web_page_module), we
call aq_parent instead to reach the Web Site.
"""
return self.aq_parent.getWebSiteValue()
security.declareProtected(Permissions.AccessContentsInformation,
'getWebSectionValue')
def getWebSectionValue(self):
"""
Since aq_dynamic will not work well to get Web Section for language
specified case (eg. web_site_module/site/fr/section/web_page_module),
we call aq_parent instead to reach the Web Section.
"""
return self.aq_parent.getWebSectionValue()
BTREE_HANDLER = 1
HBTREE_HANDLER = 2
......
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