Hash: SHA1

Charlie Clark wrote:
> Am 21.11.2006 um 17:14 schrieb Jens Vagelpohl:
>> No, you either go into the portal_skins tool, find the  
>> main_template and use the "Customize" functionality to create a  
>> copy in the "custom" skin folder, which you can edit. Or, and this  
>> is the more complicated but "right" way to do it, you create a  
>> filesystem product with a filesystem skin folders and maintain your  
>> new main_template on the file system. Then you just need to make  
>> sure your new skin folder is higher up in the list of skin folders  
>> for the skin you use. A good sample product for setting up a new  
>> skin folder and integrating it is CMFCalendar, which is part of the  
>> CMF.
> Just so I understand this properly. The second, "right", way of doing  
> this is to move pretty much all the code into the file system?  
> Assuming I just wanted to alter the skins is there a skeleton way to  
> do this?

The following two commands create the absolute minimum product which
makes filesystem skins availalbe.  Run this from your INSTANCE_HOME:

$ mkdir -p Products/myproduct/skins/myproduct
$ cat > Products/myproduct/__init__.py <<EOT
> from Products.CMFCore.DirectoryView import registerDirectory
> registerDirectory('skins', globals())

You would then begin putting templates, scripts, etc. into the
'skins/myproduct' directory of the product, e.g.:

$ cat > Products/myproduct/skins/myproduct/some_script.py << EOT
> ## Script (Python) "some_script"
> ##parameters=
> return 'Kilroy was here!'

Next, register that skin directory in your site's skins tool, by adding
a "Filesystem Directory View" using the registered path.  Finally, add
the 'myproduct' skins dir to the search path for your skin on the skins
tool's "Properties" tab.

- --
Tres Seaver          +1 202-558-7113          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to