1- <html xmlns =" http://www.w3.org/1999/xhtml" xmlns : i18n =" http://xml.zope.org/namespaces/i18n "
2- xmlns : metal =" http://xml.zope.org/namespaces/metal " xmlns : tal =" http://xml.zope.org/namespaces/tal "
3- metal : use-macro =" context/main_template/macros/master" i18n : domain = " cs_dynamicpages " >
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" >
44
55<body >
6- <metal : content-main fill-slot =" main" >
7- <main id =" content" >
8- <tal : define tal : define ="
9- isAnon context/@@plone_portal_state/anonymous;
10- " >
11- <tal : conditionisanon tal : condition =" isAnon" >
12- <tal : replace
13- tal : replace =" python:context.REQUEST.RESPONSE.redirect(context.aq_parent.aq_parent.absolute_url(),301)" >
14- </tal : replace >
15- </tal : conditionisanon >
16- <tal : conditionisanon tal : condition =" not:isAnon" >
17- <section class =" dynamic-row state-${context/review_state}" >
18- <div class =" edit-buttons d-flex gap-2" tal : condition =" context/can_edit" >
19- <small
20- class =" d-inline-flex mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 position-relative" >
21- Template: ${context/row_template}
22- </small >
23- <a class =" btn btn-outline-primary btn-sm align-self-start" href =" ${context/absolute_url}/edit" >Edit</a >
24- <div class =" ms-auto d-flex gap-2 align-items-start" >
25- <a class =" btn btn-outline-primary btn-sm align-self-start"
26- href =" ${context/aq_parent/aq_parent/absolute_url}" >Go
27- to top</a >
28- <small
29- class =" d-inline-flex mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 position-relative" >
30- Review state: ${context/review_state}
31- <span
32- tal : attributes =" class python:context.review_state() == 'published' and 'position-absolute top-0 start-100 translate-middle p-2 bg-success border border-light rounded-circle' or 'position-absolute top-0 start-100 translate-middle p-2 bg-danger border border-light rounded-circle'" >
33- </span >
34- </small >
35- </div >
366
37- </div >
38- <tal : condition tal : condition =" context/can_edit" >
39- <div class =" features-list d-flex gap-2 align-items-start mb-3"
40- tal : define =" features_list context/featured_list" >
41- <tal : featured repeat =" featured_brain features_list" >
42- <div tal : define =" featured_obj featured_brain/getObject;" >
43- <a tal : attributes =" class python:featured_obj.review_state() == 'published' and 'btn btn-outline-success btn-sm bg-success-subtle' or 'btn btn-outline-danger btn-sm bg-danger-subtle'"
44- href =" ${featured_obj/absolute_url}" >${featured_obj/Title}</a >
45- </div >
46- </tal : featured >
47- <tal : featured_add_button tal : condition =" python:context.show_featured_add_button(request)" >
48- <a class =" btn btn-outline-primary btn-sm align-self-start"
49- href =" ${context/absolute_url}/++add++DynamicPageRowFeatured" >Add new featured</a >
50- </tal : featured_add_button >
51- </div >
7+ <metal : custom_title fill-slot =" content-title" >
8+ <h1 tal : replace =" structure context/@@title" />
9+ </metal : custom_title >
5210
53- </tal : condition >
11+ <metal : custom_description fill-slot =" content-description" >
12+ <p tal : replace =" structure context/@@description" />
13+ </metal : custom_description >
5414
55- <div class =" content" >
56- <replace tal : replace =" structure python:context.render(request)" ></replace >
57- </div >
58- </section >
59- </tal : conditionisanon >
60- </tal : define >
61- </main >
62- </metal : content-main >
15+ <metal : content-core fill-slot =" content-core" >
16+ <metal : block define-macro =" content-core" >
17+
18+ <tal : replace
19+ tal : replace =" python:context.REQUEST.RESPONSE.redirect(context.aq_parent.aq_parent.absolute_url(),301)" >
20+ </tal : replace >
21+
22+ </metal : block >
23+ </metal : content-core >
6324</body >
6425
6526</html >
0 commit comments