WebHelp Responsive Template Directory Structure

A certain directory structure is required for the WebHelp Responsive templates. The names of folders at certain levels correspond to the names of template variants and skins, components are defined in specific files, and various resources need to be located in specific locations within the directory structure.

The templates are stored in DITA-OT-DIR/plugins/com.oxygenxml.webhelp.responsive/templates/dita.

Figure: Templates Directory Structure

At the first level of the template directory we can find the following predefined files and folders:

After the transformation scenario is executed, the resources and variants folders are copied in the /oxygen-webhelp/template/ folder within the output directory (defined in the Output tab of the transformation scenario).

Template Variants and Skins

You could think of a template as being a set of WebHelp components that are placed in a predefined HTML layout. You can have multiple variants of the template. A WebHelp template variant is an instance of the template with a specific set of parameters. For example, you could have two variants of the WebHelp main page, one that displays the topics in a tiles style of layout, and another one that displays the topics in a tree style.

Each variant has its own directory that corresponds to the name of the variant. The name of the variant is displayed in the user interface when the variants are displayed (for example, in the templates tab of the transformation scenario).

Each variant directory may contain the following resources:

  • Skin Directories - These folders represent skin templates for the current variant.
  • params.properties File - This file specifies the values for the parameters imposed by the variant.
  • resources Folder - This is an optional directory that contains resources that are specific to the current variant (such as images, CSS files, etc.) They will be copied to the output directory.
Skins

A variant skin represents a CSS file that allows you to alter the styling of the template. The CSS associated with a skin must be named skin.css and it must be stored as a first child of the skin directory.

Each skin might need additional resources (images, fonts) that must be stored in the resources directory in the root folder for that particular skin. The name of the skin directory is displayed in the user interface when you choose a skin (in the templates tab of the transformation scenario).

Each skin directory can also contain a skin.png preview image that will be displayed in the user interface and a properties file that contains a URL for the online preview of the skin. This image file must be stored as a first child of the skin directory.

For information about creating or customizing skins, see Create or Customize a WebHelp Responsive Skin.