File tree Expand file tree Collapse file tree 2 files changed +22
-15
lines changed
src/cs_dynamicpages/views Expand file tree Collapse file tree 2 files changed +22
-15
lines changed Original file line number Diff line number Diff line change 88 <!-- -*- extra stuff goes here -*- -->
99
1010 <browser : page
11- name =" dynamic-page-folder- view"
12- for =" * "
11+ name =" view"
12+ for =" cs_dynamicpages.content.dynamic_page_folder.IDynamicPageFolder "
1313 class =" .dynamic_page_folder_view.DynamicPageFolderView"
1414 template =" dynamic_page_folder_view.pt"
1515 permission =" zope2.View"
16- layer =" cs_dynamicpages.interfaces.ICsDynamicpagesLayer "
16+ layer =" cs_dynamicpages.interfaces.IBrowserLayer "
1717 />
1818
1919 <browser : page
Original file line number Diff line number Diff line change 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" >
2321 </metal : custom_description >
2422
2523 <metal : content-core fill-slot =" content-core" >
26- <metal : block define-macro =" content-core" >
24+ <metal : block define-macro =" content-core" >
2725
28- <h2 >Main content</h2 >
29- <!-- <div tal:replace="view/my_custom_view_method" />-->
30- <!-- <div tal:replace="context/my_custom_field" />-->
26+ <tal : define tal : define ="
27+ isAnon context/@@plone_portal_state/anonymous;
28+ " >
29+ <tal : condition tal : condition =" isAnon" >
30+ <tal : replace tal : replace =" python:context.REQUEST.RESPONSE.redirect(context.aq_parent.absolute_url(),301)" >
31+ </tal : replace >
32+ </tal : condition >
33+ <tal : conditionisanon tal : condition =" not:isAnon" >
34+ <a class =" btn btn-primary btn-lg" href =" ${context/aq_parent/absolute_url}" >View dynamic page</a >
35+ </tal : conditionisanon >
36+ </tal : define >
3137
32- </metal : block >
38+ </metal : block >
3339 </metal : content-core >
3440</body >
35- </html >
41+
42+ </html >
You can’t perform that action at this time.
0 commit comments