Personal tools
Skip to content. | Skip to navigation
This package implements a widget that lets users enter a query and select from the results.
Overview The z3c.jbot (or "Just a bunch of templates") package allows easy customization of existing templates and images. It works on Zope 2 and Zope 3. The Chameleon rendering engine is supported [1]. Use of this package adds a small (2-3 ms per request on Plone) to the total application response time. [1] To enable Chameleon on Zope 2, use the five.pt package (CMF-apps like Plone should use cmf.pt which adds full support). Usage To override a particular file, first determine its canonical filename. It's defined as the path relative to the package within which the file is located; directory separators are replaced with dots. Example: Suppose you want to override: /plone/app/layout/viewlets/logo.pt You would use the filename: plone.app.layout.viewlets.logo.pt Simply drop the file in a directory and register that directory for use with jbot using a ZCML-directive: <include package="z3c.jbot" file="meta.zcml" /> <browser:jbot directory="<path>" layer="<layer>" /> Templates in views, viewlets and portlets Any template that is defined as a class-attribute can be overriden using jbot, e.g. those used in views, viewlets and portlets. The template overrides may be registered for any request layer or only a specific layer. CMF objects Any skin-object (e.g. images, templates) on the file system (directory views) can be overridden.
This package provides an adapter and a TALES expression for a more explicit and more flexible macro handling using the adapter registry for macros.
This package contains two things: * the z3c.objpath.interfaces.IObjectPath interface. * some helper functions to construct (relative) object paths, in z3c.objpath.path. The idea is that a particular application can implement a utility that fulfills the IObjectPath interface, so that it is possible to construct paths to objects in a uniform way. The implementation may be done with zope.traversing, but in some cases you want application-specific object paths. In this case, the functions in z3c.objpath.path might be useful.
Pagelets are Zope 3 UI components. In particular they allow the developer to specify content templates without worrying about the UI O-wrap. This package provides a very flexible base implementation that can be used to write view components which can be higly customized later in custom projects. This is needed if you have to write reusable components like those needed in a framework. Pagelets are BrowserPages made differently and can be used to replace them. What does this mean? We separate the python view code from the template implementation. And we also separate the template in at least two different templates - the content template and the layout template. This package uses z3c.template and offers an implementaton for this template pattern. Additionaly this package offers a pagelet directive wich can be used to register pagelets. Pagelets are views which can be called and support the update and render pattern. How do they work A pagelet returns the rendered content without layout in the render method and returns the layout code if we call it. See also z3c.template which shows how the template works. These samples will only show how the base implementation located in the z3c.pagelet.browser module get used. BrowserPagelet The base implementation called BrowserPagelet offers builtin __call__ and render methods which provide the different template lookups. Take a look at the BrowserPagelet class located in z3c.pagelet.browser and you can see that the render method returns a IContentTemplate and the __call__ method a ILayoutTemplate defined in the z3c.layout package.
This is a fast implementation of the ZPT template engine for Zope 3 which uses Chameleon to compile templates to byte-code. The package provides application support equivalent to zope.app.pagetemplate.