This documentation dwells on preparation and
peculiarities of building the 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 H-Sphere properties file
and that custom templates have correct pathes in the custom template directory.
Note: H-Sphere 2.4 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.
- Login to the CP server as cpanel user.
All customization should be done under cpanel, and all affected files
should have cpanel:cpanel ownership.
- 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
- Add symlinks to the custom image directory from the default template
directory (/hsphere/local/home/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.
- 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.
- To implement custom templates, follow instructions outlined in the
Template Customization guide.
- To implement custom images for 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:
- You should include only .html.in template sources. They will be compiled
automatically during the package installation.
- If you customize the Control Panel menu or skins,
you need to run the package configurator with the --with-xmls option to
add custom menu.xml and design-config.xml files to the
package, and
with the --with-properties option to plug in these custom XMLs to the system.
See also Building Packages with XMLs for details.
|