summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f0ab2cd)
raw | patch | inline | side by side (parent: f0ab2cd)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 22 Aug 2002 00:14:34 +0000 (00:14 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 22 Aug 2002 00:14:34 +0000 (00:14 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@983 57a73879-2fb5-44c3-a270-3262357dd7e2
doc/templating.txt | patch | blob | history |
diff --git a/doc/templating.txt b/doc/templating.txt
index 6386c3765767e77e939fb45b23ec95e59d94094b..e24b4f28ffc625cfc97a5fe5f4260f24f8844628 100644 (file)
--- a/doc/templating.txt
+++ b/doc/templating.txt
HTML Templating Mechanisms
==========================
-:Version: $Revision: 1.9 $
+:Version: $Revision: 1.10 $
Current Situation and Issues
============================
''' return an HTMLItem instance '''
def classhelp(self, ...)
def list(self, ...)
+ def filter(self):
+ ''' Return a list of items from this class, filtered and sorted
+ by the current requested filterspec/filter/sort/group args
+ '''
Accesses through an *item*::
def __init__(self, ...)
def filterspec(self, ...)
-Action
-======
+Template files
+~~~~~~~~~~~~~~
+
+Each instance will have the opportunity to supply the following templates:
+
+page
+ This is the overall page look template, and includes at some point a TAL
+ command that includes the variable "content". This variable causes the actual
+ page content to be generated.
+
+*.index
+ Displays a list of items from the database, and a "filter refinement" form.
+ Would perform a TAL ``repeat`` command using the list supplied by
+ ``class/filter``. This deviates from the current situation in that currently
+ the index template specifies a single row, and the filter part is
+ automatically generated.
+
+*.item
+ Displays a single item from the database using the *classname* variable (that
+ is, the variable of the same name as the class being displayed. If
+
+*.filter
+ Displays a full search form for a class.
-1. Investigate how PageTemplates would be integrated into Roundup:
+Note that the newitem template doesn't really apply any more because the item
+templates may determine whether the page has an existing item to render.
- - we could go for a fully-divorced-from-Zope approach, which would involve
- bundling PageTemplates/TAL/ZTUtils in with Roundup, with all the
- Zope-specific bits removed.
- - we could try to coexist with a Zope installation, but there the problem
- would be that Zope includes its own copy of PageTemplates/TAL/ZTUtils and
- we'd be installing a version in site-packages, which would be bad.
- The latter may allow nicer integration with Zope itself, giving Zope
- Roundup users access to acquired information in their templates. We could
- get around that by modifying the ZRoundup interface to use the "real Zope"
- ZPT. Maybe.
+Integrating Code
+~~~~~~~~~~~~~~~~
-2. Implement the Roundup infrastructure described in the `implementation`_
- above.
+We will install PageTemplates, TAL and ZTUtils in site-packages. If there is a
+local Zope installation, it will use its own PageTemplates code (Zope modifies
+the module search path to give precedence to its own module library).
+We will then install the trivial MultiMapping and ComputedAttribute modules in
+the Roundup package, and have some import trickery that determines whether
+they are required, and if so they will be imported as if they were at the
+"top level" of the module namespace.