1- <html xmlns =" http://www.w3.org/1999/xhtml"
2- xmlns : metal =" http://xml.zope.org/namespaces/metal"
3- xmlns : tal =" http://xml.zope.org/namespaces/tal"
4- xmlns : i18n =" http://xml.zope.org/namespaces/i18n"
5- i18n : domain =" cs_dynamicpages"
6- metal : use-macro =" context/main_template/macros/master" >
1+ <html xmlns =" http://www.w3.org/1999/xhtml" xmlns : metal =" http://xml.zope.org/namespaces/metal"
2+ xmlns : tal =" http://xml.zope.org/namespaces/tal" xmlns : i18n =" http://xml.zope.org/namespaces/i18n"
3+ i18n : domain =" cs_dynamicpages" metal : use-macro =" context/main_template/macros/master" >
4+
75<body >
86
97 <metal : custom_title fill-slot =" content-title" >
108 <h1 tal : replace =" structure context/@@title" />
11-
12- <!-- @@title view template: -->
13- <!--
14- <h1 tal:define="title context/Title" tal:condition="title" tal:content="title">
15- Title or id
16- </h1>
17- -->
18-
199 </metal : custom_title >
2010
2111 <metal : custom_description fill-slot =" content-description" >
2212 <p tal : replace =" structure context/@@description" />
2313 </metal : custom_description >
2414
2515 <metal : content-core fill-slot =" content-core" >
26- <metal : block define-macro =" content-core" >
16+ <metal : block define-macro =" content-core" >
2717
28- <h2 >Main content</h2 >
29- <!-- <div tal:replace="view/my_custom_view_method" />-->
30- <!-- <div tal:replace="context/my_custom_field" />-->
18+ <tal : define tal : define ="
19+ isAnon context/@@plone_portal_state/anonymous;
20+ " >
21+ <tal : condition tal : condition =" isAnon" >
22+ <tal : replace tal : replace =" python:context.REQUEST.RESPONSE.redirect(context.aq_parent.absolute_url(),301)" >
23+ </tal : replace >
24+ </tal : condition >
25+ <tal : conditionisanon tal : condition =" not:isAnon" >
26+ <a class =" btn btn-primary btn-lg" href =" ${context/aq_parent/absolute_url}" >View dynamic page row</a >
27+ </tal : conditionisanon >
28+ </tal : define >
3129
32- </metal : block >
30+ </metal : block >
3331 </metal : content-core >
3432</body >
35- </html >
33+
34+ </html >
0 commit comments