Author: jmorliaguet
Date: Sat Oct 22 14:18:44 2005
New Revision: 28535

Modified:
   z3lab/z3ecm/trunk/src/ecm/cpsskins/README.txt
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml
Log:

- we use 'zope' as the default directive in the tutorial, so we know that 
  a portlet is a cpsskins:portlet.



Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/README.txt
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/README.txt       (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/README.txt       Sat Oct 22 14:18:44 2005
@@ -57,6 +57,7 @@
 
  $ make
 
+
 Rationale
 ---------
 
@@ -154,7 +155,9 @@
 
 * example5/
 
-This example show how to turn a Zope3 view into a portlet.
+This example shows how to turn Zope3 views into a portlet.
+
+TODO
 
 
 B) How to write a widget

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt      (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt      Sat Oct 22 
14:18:44 2005
@@ -107,3 +107,27 @@
 
     def __call__(self, **kw):
         return u"Hello world"
+
+
+Step 4: registrering the portlet
+................................
+
+You now have all the components ready to be used. They still need to be
+registered in Zope3. This is done in ZCML using cpsskins directives.
+
+While going through this step, open the 'configure.zcml' file located in this
+package.
+
+cpsskins provides a set of directives that make it easier to register
+different types of elements such as portlets.
+
+In the header of your ZCML file declare the 'cpsskins' namespace:
+
+<configure
+    xmlns:cpsskins="http://namespaces.zope.org/cpsskins";
+    ...
+
+
+Portlets are registered with the 'cpsskins:portlet' directive
+
+

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml  Sat Oct 22 
14:18:44 2005
@@ -1,13 +1,13 @@
 <configure
-    xmlns="http://namespaces.zope.org/cpsskins";
+    xmlns="http://namespaces.zope.org/zope";
     xmlns:i18n="http://namespaces.zope.org/i18n";
-    xmlns:zope="http://namespaces.zope.org/zope";
+    xmlns:cpsskins="http://namespaces.zope.org/cpsskins";
     i18n_domain="ecm"
     >
 
   <!-- The 'Hello portlet' says 'Hello world' -->
 
-  <portlet
+  <cpsskins:portlet
       name="example1"
       title="Example1: Hello portlet"
       description="A hello world"
@@ -16,7 +16,7 @@
       icon="hello-icon.png"
   />
 
-  <zope:adapter
+  <adapter
       factory=".hello.HelloPortletData"
   />
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml  Sat Oct 22 
14:18:44 2005
@@ -1,13 +1,13 @@
 <configure
-    xmlns="http://namespaces.zope.org/cpsskins";
+    xmlns="http://namespaces.zope.org/zope";
     xmlns:i18n="http://namespaces.zope.org/i18n";
-    xmlns:zope="http://namespaces.zope.org/zope";
+    xmlns:cpsskins="http://namespaces.zope.org/cpsskins";
     i18n_domain="ecm"
     >
 
   <!-- The 'Text portlet' displays some text entered by the user -->
 
-  <portlet
+  <cpsskins:portlet
       name="example2"
       title="Example2: Text portlet"
       description="A simple text portlet"
@@ -16,7 +16,7 @@
       icon="text-icon.png"
   />
 
-  <zope:adapter
+  <adapter
       factory=".text.TextPortletData"
   />
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml  Sat Oct 22 
14:18:44 2005
@@ -1,41 +1,40 @@
 <configure
-    xmlns="http://namespaces.zope.org/cpsskins";
+    xmlns="http://namespaces.zope.org/zope";
     xmlns:i18n="http://namespaces.zope.org/i18n";
-    xmlns:zope="http://namespaces.zope.org/zope";
+    xmlns:cpsskins="http://namespaces.zope.org/cpsskins";
     i18n_domain="ecm"
     >
 
   <!-- The 'Items portlet' produces a list of items  -->
 
-  <portlet
+  <cpsskins:portlet
       name="example3"
       title="example3: Items portlet"
       description="A portlet that returns a list of items"
       factory=".items.ItemsPortlet"
       schema=".items.IItemsPortlet"
-      icon="items-icon.png">
-
-  </portlet>
+      icon="items-icon.png"
+  />
 
-  <presentation
+  <cpsskins:presentation
       for=".items.IItemsPortlet">
 
-      <display
+      <cpsskins:display
          type="box"
       />
 
-      <format
+      <cpsskins:format
          name="widget"
          id="vertical_menu"
       />
 
-      <format
+      <cpsskins:format
          name="style"
       />
 
-  </presentation>
+  </cpsskins:presentation>
 
-  <zope:adapter
+  <adapter
       factory=".items.ItemsPortletData"
   />
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml  Sat Oct 22 
14:18:44 2005
@@ -1,23 +1,22 @@
 <configure
-    xmlns="http://namespaces.zope.org/cpsskins";
-    xmlns:zope="http://namespaces.zope.org/zope";
+    xmlns="http://namespaces.zope.org/zope";
+    xmlns:cpsskins="http://namespaces.zope.org/cpsskins";
     xmlns:i18n="http://namespaces.zope.org/i18n";
     i18n_domain="ecm"
     >
 
   <!-- The 'Actions portlet' produces a list of actions items -->
 
-  <portlet
+  <cpsskins:portlet
       name="example4"
       title="Example4: Actions portlet"
       description="A portlet that returns a list of actions items"
       factory=".actions.ActionsPortlet"
       schema=".actions.IActionsPortlet"
-      icon="actions-icon.png">
-
-  </portlet>
+      icon="actions-icon.png"
+  />
 
-  <presentation
+  <cpsskins:presentation
       for=".actions.IActionsPortlet">
 
       <display
@@ -33,9 +32,9 @@
          name="style"
       />
 
-  </presentation>
+  </cpsskins:presentation>
 
-  <zope:adapter
+  <adapter
       factory=".actions.ActionsPortletData"
   />
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to