Commit b141e962 authored by Kevin Deldycke's avatar Kevin Deldycke

Use container/content_layout to locally custom news section. Thanks to this I...

Use container/content_layout to locally custom news section. Thanks to this I can remove the dirty branching code.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8783 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 172ad68e
......@@ -54,16 +54,17 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block tal:define="default_layout string:view_master;\n
<tal:block tal:define="default_layout string: view_master;\n
default_content here/WebSite_getDefaultDocumentValue | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
layout_form_id here/getApplicableLayout | nothing;\n
layout_form python:not(layout_form_id) or ignore_layout or getattr(here, layout_form_id, None);\n
layout_form python: not(layout_form_id) or ignore_layout or getattr(here, layout_form_id, None);\n
layout_id layout_form/pt | default_layout;">\n
\n
<tal:block metal:use-macro="python: getattr(here, layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
\n
<tal:block tal:condition="python: (not editable_mode) and (not ignore_layout) and (default_content is not None)">\n
<tal:block tal:define="global here python: default_content;\n
global form python: here.WebPage_view;\n
......@@ -75,16 +76,9 @@
</tal:block>\n
\n
<tal:block tal:condition="python: default_content is None and not editable_mode">\n
<tal:block tal:replace="nothing"><!--\n
Render a special page for news web_sites.\n
--></tal:block>\n
<tal:block tal:condition="python: context.getId().lower() == \'news\'">\n
<tal:block metal:use-macro="python: getattr(here, \'%s_news_list\' % here.WebSite_getSiteValue().getId()).macros[\'master\']"/>\n
</tal:block>\n
<tal:block tal:condition="python: context.getId().lower() != \'news\'">\n
No default page defined.\n
</tal:block>\n
This section contain no document.\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>\n
\n
......
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