[Zope-Checkins] SVN: Products.Five/branches/philikon-local-components/component/component.txt small cleanup

Philipp von Weitershausen philikon at philikon.de
Sat Mar 4 19:18:28 EST 2006


Log message for revision 65807:
  small cleanup
  

Changed:
  U   Products.Five/branches/philikon-local-components/component/component.txt

-=-
Modified: Products.Five/branches/philikon-local-components/component/component.txt
===================================================================
--- Products.Five/branches/philikon-local-components/component/component.txt	2006-03-04 23:41:16 UTC (rev 65806)
+++ Products.Five/branches/philikon-local-components/component/component.txt	2006-03-05 00:18:28 UTC (rev 65807)
@@ -1,10 +1,27 @@
-(Local) components in Five
-==========================
+Locally customizing template-based views
+========================================
 
+This document describes a typical story of locally customizing a
+global view component.  The steps in this story are:
+
+1. Making a folder a site
+
+2. Walking up to an object and getting a list of its template-based
+   views
+
+3. Selecting a particular view, seeing its template source and
+   deciding to customize it
+
+4. Customizing the template and seeing the customized template take
+   effect
+
+5. Deleting the template and seeing the old view take over again
+
+
 Setup
 -----
 
-We need to load some important ZCML:
+Before we can start we need to load some important ZCML:
 
   >>> from Products.Five import zcml
   >>> import Products.Five.component
@@ -18,10 +35,10 @@
   >>> root = Application()
 
 
-Turning ObjectManagers into a site
-----------------------------------
+1. Turning an ObjectManager into a site
+----------------------------------------
 
-Let's create a folder that we'll turn into a site:
+Let's create a folder that we'll turn into a Zope3-style site:
 
   >>> from OFS.ObjectManager import ObjectManager
   >>> site = ObjectManager()
@@ -55,8 +72,8 @@
   <zope.component.persistentregistry.PersistentComponents object at ...>
 
 
-Views on objects
-----------------
+2. Template-based views available on an object
+----------------------------------------------
 
 Let's create a simple content object that we put into the folder
 (a.k.a. the site):
@@ -79,8 +96,8 @@
   [u'customizetemplate.html', u'templateviews.html']
 
 
-Customizing views
------------------
+3. and 4. Customizing a template-based view
+-------------------------------------------
 
 In the list of template-based browser views we can select one and see
 the source of its template:
@@ -157,7 +174,9 @@
   nothing:   
   <BLANKLINE>
 
+
 Clean up:
+---------
 
   >>> from zope.app.testing.placelesssetup import tearDown
   >>> tearDown()



More information about the Zope-Checkins mailing list