Frostbite 0.2 Released
Download
Version 0.2 of the product is now available.
Rationale
CMF's skins tools allows pretty much arbitrary flexibility in the composition of skins from filesystem directories and ZODB folders. This flexibility is a boon during development, but imposes a runtime performance cost for every name acquired through the site / tool.
In addition, skin scripts run as "untrusted" code; while "safer", this mode is also substantially slower.
Solution
The Frostbite product addresses these performance issues by generating a filesystem product containing selected templates and scripts from a skin.
Using Frostbite
- Add the
portal_skinfreezer
tool to your site ("CMF Skin Freezer" in the ZMI add list). - On the tool's "Freeze" tab, select skins tool ("portal_skins" is the default), the skin path (leave blank for the skins tool's default path), and click "List Candidates."
- Select one or more of the listed templates / scripts and click
the “Freeze” button. Supply a product and class name to be used
when generating the filesystem code.
- To preview the content in the browser, rather than downloading it, check the "Render Inline" checkbox.
- Click the "Freeze" button, and save the downloaded file as
__init__.py
. - Create an empty directory in your INSTANCE_HOME's
Products
directory, using the same name you supplied as the product name. Copy the saved__init__.py
to that directory. - Restart Zope.
- Add an instance of your generated product's class to the skins tool of your site.
- Add the freezer object to the skin path, ahead of the paths from which you generated it.