You are not logged in Log in Join
You are here: Home » Download Zope Products » Content Management Framework » CMF Documentation » Administering CMF Sites » How-To Migrate from PTK to CMF (New PTK) » View Document

Log in
Name

Password

 

How-To Migrate from PTK to CMF (New PTK)

A detailed discussion on Migrating from the old style PTK to the CMF (new style PTK), providing scripts to move acl_users and Member folders. Also discuss the new skins and stylesheets for customizing one's PTK instance.
How-To Migrate from PTK to CMF (New PTK)

How-To Migrate from PTK to CMF (New PTK)

Installation

The best method to migrating from the PTK to the CMF (new PTK) is to download and install the latest release of the CMF. Install the product, and create a new instance of a portal along side of your existing portal (select Portal (new) from your Products pull-down and give it an id). Once the new portal instance is installed, the following steps will help get you up and running.

Copy acl_users

1. To migrate users from the acl_users, download and install external method copy_users. If you have modified or used someother form of login manager, you'll have to deal with login management differently (one possible option is duscussed here).

    a. The external method needs to be installed in your Zope/Extensions directory.

    b. Open web browser to access the ZMI[1].

      i. In the root of your Zope installation, add the external method from the products pull-down menu.

      ii. Give it an id, set the module name to copy_users

      iii. Set the function name to copyUsers

    c. Create a DTML method which does something like the following:

      i. <dtml-call "copy_users('/sourcePortal/acl_users','/targetPortal/acl_users')">

      ii. View the newly created DTML method (this will migrate all of your portal instance's existing acl_users to the new portal instance's acl_users).

Move Member Folders

2. To migrate Member folders from the source PTK install to the target CMF install, download and install the external method copy_folders.py. This method will move your member folders, ensuring both ownership and local roles remain intact (simply cutting and pasting these folders from one instance to another will change the ownership to the user who is doing the cutting and pasting).

    a. The external method needs to be installed in your Zope/Extensions directory

    b. Open web browser to access the ZMI

      i. In the root of your zope installation, add the external method from the products pull-down menu.

      ii. Give it an id, and set the module name to copy_folders

      iii. Set the function name to copyFolder

    c. Create a DTML method which does something similar to the following:

      i.<dtml-call "copy_folder('/sourcePortal/Members','/targetPortal/Members')">

      ii.      View the newly created DTML method (this will run the external method, migrating all of folders in your Members folder to the new portal instance's Members folder).

Move Other Objects

3. To migrate other objects you've added to your portal, simply cut and paste these objects. Make sure you are logged into the ZMI as a user with management permissions. If you have folders which you need to move and retain ownership, you can use the external method copy_folders.py, passing the proper arguments as described above to suit your existing instance.

    a. For example, to copy a Squishdot instance from the old PTK to our newly created CFM instance, simply select the object, click copy, change to the new instance of the CFM and select paste.

Customizing Portal Skins

4. If you have modified the skin of the your portal installation, you will need to modify the skins to get your look and feel setup on the new portal instance. The following steps should give you a good idea about how to go about doing this in with the new skin features of the CMF. At the time of writing this document, the 'custom' skin folder was not automatically created with the new portal. In the current release, 'custom' is now automatically created for you, but the steps outlined below guide you through the process of adding additional custom skins.

Customizing Stylesheets

5. Stylesheets have also been moved to the filesystem. The following steps walk you through this simple process.

Adding Custom DTML (Methods)

6. Adding custom DTML to your portal instances should change slightly to previous instances of the PTK. DC is taking the stand the additional DTML added to portal's is considered 'skin' material, and thus should not be in the root of the portal, but added to one of your custom skin directories (see above). As long as your DTML is in the path assigned to your custom skin, it will be found within the namespace.

    a.In our sample portal, we have a DTML method which displays the most recent downloads added to the site (very similar to the recent news method). We simply go into your custom skins directory, and create a new DTML method. We can then call this method from anywhere in the portal which uses the custom skin (or has custom in it's path, see the skins discussion above).

7. Adding a new product type to the portal.

    a.Portal Types Tool
      i. Select the portal types tool, and add new Content Factory Metadata.

      ii. Give it an ID and the proper Metadata.

    b. Add the new product python module to PTKDemo

    c. Edit __init__.py

      i. Import new module

      ii. Add the product to the module_aliases, contentClasses, contentConstructors,

    d. Add the web 'wizard forms' to PTKDemo/dtml folder.