plone.resource 1.0.1

Publishes directories of static files via the ZPublisher
plone.resource is a Plone product that publishes directories of static files via the ZPublisher. These directories may be located either in the ZODB (as OFS folders and files), or on the filesystem.

Each resource directory has a type and a name. When combined, these are used to traverse to the resource directory. For example:

/++theme++mytheme/< subpath >
/++sitelayout++mylayout/< subpath >
/++templatelayout++mylayout< subpath >

Where resources can be stored

Resource directory contents can be found by the traverser in several different places. The following locations are tried in order.

Files in the ZODB

- Installing plone.resource creates a folder called portal_resources which can be used to store resource directories persistently. By convention, the top-level folders under this folder correspond to resource types, and the second-level folders correspond to the resource directory name.

- So, the file traversable at /++theme++mytheme/myfile could be physically located at some_site/++etc++site/resources/theme/mytheme

- (XXX: provide a helper to upload a tarball/zip)

Files in Python distributions

- A folder in a Python distribution (e.g. egg) can be registered as a resource directory of a particular type and name using the plone:static ZCML directive. For example, this registers a directory named "theme" as a resource directory of type "theme". It would be accessible at ++theme++mytheme:

 < plone:static
 / >

last updated on:
May 27th, 2012, 14:34 GMT
license type:
GPL (GNU General Public License) 
developed by:
Laurence Rowe and others
ROOT \ Internet \ Plone Extensions
Download Button

In a hurry? Add it to your Download Basket!

user rating



Rate it!
What's New in This Release:
  • Make sure text/html files imported as persistent files will be served with a utf-8 encoding. This fixes [davisagli]
read full changelog

Add your review!