Commit 8247a191 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: get web site theme for web page inside it

parent 2c4f2f46
...@@ -326,6 +326,12 @@ if pass_parameter is not None and pass_source_data is not None: ...@@ -326,6 +326,12 @@ if pass_parameter is not None and pass_source_data is not None:
# XXX custom? # XXX custom?
if pass_parameter == "theme": if pass_parameter == "theme":
theme = None theme = None
tmp = context
#check if web page is inside web site or web section
while portal_type == 'Web Page':
tmp = tmp.aq_parent
portal_type = tmp.getPortalType()
if portal_type == "Web Site" or portal_type == "Web Section": if portal_type == "Web Site" or portal_type == "Web Section":
pass_flag_site = True pass_flag_site = True
product_candidate_list = callSelf("product", pass_source_data, pass_flag_site) product_candidate_list = callSelf("product", pass_source_data, pass_flag_site)
......
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