Usually, you build portal layouts using CPSSkins. When you finally have the layout, you could need to get the XML code to complete your product.
You can do it by exporting the Portlet and Theme Tools on ZMI Setup Tool. So, you can get the XML files needed to complete your product profile.
Other way to save our work is to export the theme within CPSSKins, following these steps: Themes manager -> Select your theme -> Export this theme -> Export on zexp format.
With this format you can import then directly within CPSSkins.
Best the first way. ;)
Did not find a how-to for your problem?
Ask me to write the how-to post by writing to the mailing-list at cps-devel [@] lists [.] nuxeo [.] com or writing to me to joseluisdelarosa+cpshowto [@] gmail [.] com. Note: I'll keep all conversations on the official mailing list.
Showing posts with label profiles. Show all posts
Showing posts with label profiles. Show all posts
Friday, May 9, 2008
Thursday, June 14, 2007
How to import skins folders
This post will put the tool portal_skins of CMF to work for the product CPSMessages.
In CMF the folders called skins are folders that have python scripts and Zope's page templates that can be called from whichever URL of the server.
To add the skins tool feature to the product CPSMessages the process is this:
Questions? Please, leave a comment ;-)
In CMF the folders called skins are folders that have python scripts and Zope's page templates that can be called from whichever URL of the server.
To add the skins tool feature to the product CPSMessages the process is this:
- Add a file called skins.xml to the folder CPSMessages/profiles/default. The text of the file should look like this:
<?xml version="1.0"?>
<object name="portal_skins" meta_type="CMF Skins Tool">
<object name="messages_default" meta_type="Filesystem Directory View"
directory="CPSMessages/skins/messages_default"/>
<skin-path name="CPSSkins">
<layer name="messages_default" insert-after="custom"/>
</skin-path>
<skin-path name="CPSSkins-macroless">
<layer name="messages_default" insert-after="custom"/>
</skin-path>
</object> - Add a new step to the file CPSMessages/profiles/default/import_steps.xml with this content:
<import-step id="skins" version="20040630-01"
handler="Products.CMFCore.exportimport.skins.importSkinsTool"
title="Skins Tool">
<dependency step="toolset"/>
Import skins tool's filesystem directory views and skin path definitions.
</import-step> - Create a folder in the path CPSMessages/skins/messages_default.
- In the folder created in step 3, add a file called hello_skins.zpt with these words in it:
<p i18n:translate="hello_skins_imported">
Hello, skins were imported sucessfully!
</p> - Register the skins directory so that Zope can access to its content. The way to do it is to add these two lines to the file CPSMessages/__init__.py.
from Products.CMFCore.DirectoryView import registerDirectory
registerDirectory('skins', globals()) - Restart Zope. The restart is needed because __init__.py file changed.
- Go to the tab Import of the tool portal_setup and check the step called Skins tool. Make sure that CPSMessages is the chosen profile in the combo box titled Profile and click the button “Import selected steps”.
- In the tool portal_skins you should see a folder called messages_default and after clicking on it, an object called hello_skins should be in there (notice that the extension is ommited). Click on the object hello_skins and use the tab “Test” to see it in action.
Questions? Please, leave a comment ;-)
Subscribe to:
Posts (Atom)