Personal tools
Skip to content. | Skip to navigation
plone.app module
You will typically run plone.app.async in a ZEO environment, where you will have one or more worker instances that act as dispatchers carrying out jobs queued by your main zope instances. For the sake of simplicity it is assumed that you have one instance that can queue new jobs, and one worker instance that consumes them, both operating on a single database. * Each instance has to set the ZC_ASYNC_UUID environment variable in order to integrate properly with zc.async. * Each instance loads the single_db_instance.zcml configuration. The worker instance loads the single_db_worker.zcml configuration in order to setup the queue and configure itself as a dispatcher. For more details please look at the example buildout configurations included in the package.
This package aims to be an add-on for Plone (>= 3.x) integrating ZODB (>=3.8) blob support, which allows large binary data to be managed by the ZODB, but separately from your usual FileStorage database, i.e. Data.fs. This has several advantages, most importantly a much smaller Data.fs and better performance both cpu- as well as memory-wise.
This package implements the 'blocks' rendering model, by providing several transform stages that hook into plone.transformchain. The rendering stages are: plone.app.blocks.parsexml (order 8000) Turns the response in a repoze.xmliter XMLSerializer object. This is then used by the subsequent stages. If the input is not HTML, the transformation is aborted. plone.app.blocks.mergepanels (order 8100) Looks up the site layout and executes the panel merge algorithm. Sets a request variable ('plone.app.blocks.merged') to indicate that it has done its job. plone.app.blocks.tiles (order 8500) Resolve tiles and place them directly into the merged layout. This is the fallback for views that do not opt into ITilePageRendered. plone.app.blocks.esirender (order 8900) Only executed if the request key plone.app.blocks.esi is set and has a true value, as would be the case if any ESI-rendered tiles are included and ESI rendering is enabled globally. This step will serialise the response down to a string and perform some substitution to make ESI rendering work. The package also registers the sitelayout plone.resource resource type, allowing site layouts to be created easily as static HTML files served from resource directories. The URL to a site layout is typically something like: /++sitelayout++my.layout/site.html See plone.resource for more information about how to register resource directories. For site layouts, the type of the resource directory is sitelayout. It is possible to provide a manifest file that gives a title, description and alternative default file for a site layout HTML file in a resource directory. To create such a manifest, put a manifest.cfg file in the layout directory with the following structure: [sitelayout] title = My layout title description = Some description file = some-html-file.html All keys are optional. The file defaults to site.html. A vocabulary factory called plone.availableSiteLayouts is registered to allow lookup of all registered site layouts. The terms in this vocabulary use the URL as a value, the resource directory name as a token, and the title from the manifest (falling back on a sanitised version of the resource directory name) as the title. The current default site layout can be identified by the plone.registry key plone.defaultSiteLayout, which is set to None by default. To always use the current site default, use: <html data-layout="./@@default-site-layout"> The @@default-site-layout view will render the current default site layout. It is possible for the default site layout to be overridden per section, by having parent objects provide or be adaptable to plone.app.blocks.layoutbehavior.ILayoutAware. As the module name implies, this interface can be used as a plone.behavior behavior, but it can also be implemented directly or used as a standard adapter. The ILayoutAware interface defines three properties: content, which contains the body of the page to be rendered pageSiteLayout, which contains the path to the site layout to be used for the given page. It can be None if the default is to be used. sectionSiteLayout, which contains the path to the site layout to be used for pages underneath the given page (but not for the page itself). Again, it can be None if the default is to be used. To make use of the page site layout, use the following: <html data-layout="./@@default-site-layout"> See rendering.txt for detailed examples of how the processing is applied, and esi.txt for details about how Edge Side Includes can be supported.