Commit e422a1bf authored by Ivan Tyagov's avatar Ivan Tyagov

Reuse as long as possible calculated doc's web section list (as this is an expensive operation)

parent 6a860071
...@@ -114,11 +114,12 @@ doc_info[\'thumbnail_url\'] = context.Base_getThumbnailAbsoluteUrl()\n ...@@ -114,11 +114,12 @@ doc_info[\'thumbnail_url\'] = context.Base_getThumbnailAbsoluteUrl()\n
if website is None:\n if website is None:\n
website = context.getWebSiteValue() or context.REQUEST.get(\'current_web_site\')\n website = context.getWebSiteValue() or context.REQUEST.get(\'current_web_site\')\n
\n \n
sections = []\n doc_info[\'sections\'] = []\n
for websection in website.getWebSectionValueList(context):\n if document_web_section_list is None:\n
sections.append({\'title\': websection.getCompactTranslatedTitle(),\n document_web_section_list = website.getWebSectionValueList(context)\n
\'url\': websection.absolute_url()})\n for websection in document_web_section_list:\n
doc_info[\'sections\'] = sections\n doc_info[\'sections\'].append({\'title\': websection.getCompactTranslatedTitle(),\n
\'url\': websection.absolute_url()})\n
doc_info[\'url\'] = context.absolute_url()\n doc_info[\'url\'] = context.absolute_url()\n
\n \n
return context.Document_viewPopupTemplate(**doc_info)\n return context.Document_viewPopupTemplate(**doc_info)\n
...@@ -126,7 +127,7 @@ return context.Document_viewPopupTemplate(**doc_info)\n ...@@ -126,7 +127,7 @@ return context.Document_viewPopupTemplate(**doc_info)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>website=None</string> </value> <value> <string>website=None, document_web_section_list=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
1070 1071
\ No newline at end of file \ No newline at end of file
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