Template Customization With Packages

This documentation dwells on preparation and peculiarities of building the Parallels H-Sphere packages containing templates.

Preparation

Before you build a package out of your custom templates, make sure customization you need to build into a package has already been performed correctly, that custom directories are correctly defined in the Parallels H-Sphere properties file and that custom templates have correct pathes in the custom template directory.

Note: Parallels H-Sphere upgrade script would automatically create the custom template directory and the custom image directory if they haven't been created before. If so, just skip certain steps below.

  1. Login to the CP server as cpanel user.

    All customization should be done under cpanel, and all affected files should have cpanel:cpanel ownership.

  2. In the ~cpanel/shiva/psoft_congig/hsphere.properties file, add or comment out the corresponding lines to specify the correct paths to the directories where you wish to have your custom templates and custom images. Create these directories if they do not exist yet. The default paths are:

    USER_TEMPLATE_PATH=/hsphere/local/home/cpanel/shiva/custom/templates

    USER_IMAGE_PATH=/hsphere/local/home/cpanel/shiva/custom/images

  3. Add symlinks to the custom image directory from the default template directory (~cpanel/shiva/shiva-templates/):

    ln -s /hsphere/local/home/cpanel/shiva/custom/images /hsphere/local/home/cpanel/shiva/shiva- templates/CUSTOM_IMAGES

    This will create the CUSTOM_IMAGES symlink directory in the default template directory.

  4. Make sure your custom templates are located in the custom template directory, and your custom images in the custom image directory. To correctly implement new templates or to override default templates or images, the directory structure within the custom directories should be identical to the default directories.
  5. To implement custom templates, follow instructions outlined in the Template Customization guide.
  6. To implement custom images for Parallels H-Sphere skins and icon sets, assign the dir attribute in the design_config.xml file to /CUSTOM_IMAGES instead of default /IMAGES. For example:

    <icon_image_sets base_dir="/CUSTOM_IMAGES">

For details of customizing designs, please read Skin and Icon Set Customization in Customization Guide.

Building Packages Containing Templates

After you have prepared custom templates for creating a package, follow the general instructions on building packages, with certain considerations specific to the templates:

See also Building Packages with XMLs for details.