[Checkins] SVN: plone.z3cform/trunk/ Make the default layout template CMFDefault- compatible.

Daniel Nouri daniel.nouri at gmail.com
Thu Jul 24 10:14:14 EDT 2008


Log message for revision 88792:
  Make the default layout template CMFDefault- compatible.
  
  For macros.pt, we'll need to have a look at what styles and HTML
  CMFDefault uses for its forms.
  

Changed:
  U   plone.z3cform/trunk/docs/HISTORY.txt
  U   plone.z3cform/trunk/plone/z3cform/README.txt
  U   plone.z3cform/trunk/plone/z3cform/layout.pt

-=-
Modified: plone.z3cform/trunk/docs/HISTORY.txt
===================================================================
--- plone.z3cform/trunk/docs/HISTORY.txt	2008-07-24 13:58:47 UTC (rev 88791)
+++ plone.z3cform/trunk/docs/HISTORY.txt	2008-07-24 14:14:13 UTC (rev 88792)
@@ -4,6 +4,8 @@
 0.4 - Unreleased
 ----------------
 
+* Make the default layout template CMFDefault- compatible.
+
 0.3 - 2008-07-24
 ----------------
 

Modified: plone.z3cform/trunk/plone/z3cform/README.txt
===================================================================
--- plone.z3cform/trunk/plone/z3cform/README.txt	2008-07-24 13:58:47 UTC (rev 88791)
+++ plone.z3cform/trunk/plone/z3cform/README.txt	2008-07-24 14:14:13 UTC (rev 88792)
@@ -22,8 +22,10 @@
 
   >>> MyView = wrap_form(MyForm)
 
+Then, register ``MyView`` as a ``browser:page``.
+
 The ``wrap_form`` function returns a browser view that embeds your
-form in a layout template.  Register ``MyView`` as a ``browser:page``.
+form in a CMF layout template.  See the ``layout`` module for details.
 
 For more examples, please refer to the `z3c.form docs`_ and to `this
 how-to`_.

Modified: plone.z3cform/trunk/plone/z3cform/layout.pt
===================================================================
--- plone.z3cform/trunk/plone/z3cform/layout.pt	2008-07-24 13:58:47 UTC (rev 88791)
+++ plone.z3cform/trunk/plone/z3cform/layout.pt	2008-07-24 14:14:13 UTC (rev 88792)
@@ -1,21 +1,14 @@
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:tal="http://xml.zope.org/namespaces/tal"
-      xmlns:metal="http://xml.zope.org/namespaces/metal"
-      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
-      lang="en"
-      i18n:domain="plone.z3cform">
+<html metal:use-macro="context/main_template/macros/master">
+<body>
 
-  <head>
-    <title tal:content="view/label">Title</title>
-  </head>
+<metal:slot metal:fill-slot="header" i18n:domain="cmf_default">
+  <h1 tal:content="view/label">View Title</h1>
+</metal:slot>
 
-  <body>
-      <h1 tal:content="view/label">Title</h1>
-      
-      <div id="contents">
-	<span tal:replace="structure view/contents" />
-      </div>
-  </body>
-
+<metal:slot metal:fill-slot="main" i18n:domain="cmf_default">
+  <div id="layout-contents">
+    <span tal:replace="structure view/contents" />
+  </div>
+</metal:slot>
+</body>
 </html>
-



More information about the Checkins mailing list