[Zope-CMF] Re: Getting started with CMF

Tres Seaver tseaver at palladion.com
Wed Nov 22 11:37:14 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
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())
> EOT

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!'
> EOT

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.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFZHy5+gerLs4ltQ4RAvBLAKDKqO3Tvo6bef4L2mViaBJqzHRKwwCfSkPx
yyv1xq0VeX4qh8OHE3BnjM8=
=yhIS
-----END PGP SIGNATURE-----



More information about the Zope-CMF mailing list