WebHelp Responsive Template ComponentsHistory | Edit
A WebHelp Responsive template component adds dynamics to a WebHelp template page. The rendering of a component depends on the context of where it is placed and its content depends on the transformed DITA Map.
Some of the template components can be used in all the types of template pages, while some are only available for certain template pages. For instance, the Publication Title component can be used in all pages, but the Navigation Breadcrumb component can only be used in Topic Template pages.
To include a template component in the output of a particular type of
template page, you have to reference a specific element in the particular template file. All the
elements associated with a template component should belong to the
http://www.oxygenxml.com/webhelp/components namespace.
Every component could contain custom content or reference another component. To specify where
the component content will be located in the output you can use the
component_content element as a descendant of the component element.
<whc:webhelp_search_input class="navbar-form webhelp_main_page_search" role="form" > <whc:include_html href="{$webhelp.include.before.search}"/> <div class="search_input"> <whc:component_content/> </div> </whc:webhelp_search_input>
The various components and where they can be used are as follows:
Publication Title [webhelp_publication_title]
webhelp_publication_title element must be specified in the template
file. It can be used in all four types of template pages:
In the template file, the webhelp_publication_title element can be
specified as in the following example:
<whc:webhelp_publication_title
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class:
wh_publication_title.
Publication Logo [webhelp_logo]
webhelp_logo element must be specified in the template file. It can be
used in all four types of template pages:
webhelp_logo element can be specified as in the
following
example:<whc:webhelp_logo
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In addition, you must also specify the path of the logo image in the
webhelp.logo.image transformation parameter (in the
Parameters tab in the transformation scenario). You can set the
webhelp.logo.image.target.url parameter to generate a link to a URL when
you click the logo image. If this parameter is not set, a link to the home page will
automatically be generated.
In the output, you will find an element with the class: wh_logo.
Search Input [webhelp_search_input]
webhelp_search_input element must
be specified in the template file. It can be used in all four types of template pages:
webhelp_search_input element can be specified as
in the following
example:<whc:webhelp_search_input
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class:
webhelp_search_input.
Search Results [webhelp_search_results]
webhelp_search_results element must be specified in the template file. It
can be used in the following type of template page:
In the template file, the webhelp_search_results element can be specified
as in the following example:
<whc:webhelp_search_results
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class:
wh_search_results.
Topic Breadcrumb [webhelp_breadcrumb]
webhelp_breadcrumb element must be specified
in the template file. It can be used in the following type of template page:
webhelp_breadcrub element can be specified as in
the following
example:<whc:webhelp_breadcrumb
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class: wh_breadcrumb.
This element will contain a list with items that correspond to the topics in the path. The
first item in the list has a link to the main page with the home class. The
last item in the list corresponds to the current topic and has the active
class set.
Topic Content [webhelp_topic_content]
webhelp_topic_content element must be specified in the template file. It
can be used in the following type of template page:
webhelp_topic_content element can be specified
as in the following
example:<whc:webhelp_topic_content
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class:
wh_topic_content.
Topic Side TOC [webhelp_side_toc]
webhelp_side_toc element must be specified in the
template file. It can be used in the following type of template page:
webhelp_side_toc element can be specified as in
the following
example:<whc:webhelp_side_toc
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class: wh_side_toc. This
element will contain links to the topics that are close to the current topic.
Topic Feedback [webhelp_feedback]
webhelp_feedback element must be specified in
the template file. It can be used in the following type of template page:
webhelp_feedback element can be specified as in
the following
example:<whc:webhelp_feedback
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
Child Links [webhelp_child_links]
webhelp_child_links
element must be specified in the template file. It can be used in the following type of
template page:
webhelp_child_links element can be specified as
in the following
example:<whc:webhelp_child_links
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
Main Page Topic Tiles [webhelp_tiles]
webhelp_tiles element must be specified in the template
file. It can be used in the following type of template page:
In the template file, the webhelp_tiles element can be specified as in the
following example:
<whc:webhelp_tiles
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class: wh_tiles.
If you want to control the HTML structure that is generated for a WebHelp tile you can also
specify the template for a tile by using the whc:webhelp_tile component, as
in the following example:
<whc:webhelp_tile class="col-md-4"> <!-- Place holder for tile's image --> <whc:webhelp_tile_image/> <div class="webhelp_tile_text"> <!-- Place holder for tile's title --> <whc:webhelp_tile_title/> <!-- Place holder for tile's shordesc --> <whc:webhelp_tile_shortdesc/> </div> </whc:webhelp_tile>
For information about customizing the tiles, see Configuring the Tiles on the Main Page.
Main Page Table of Contents [webhelp_main_page_toc]
webhelp_main_page_toc element must be specified in the template file. It
can be used in the following type of template page:
In the template file, the webhelp_main_page_toc element can be specified
as in the following example:
<whc:webhelp_main_page_toc
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class:
wh_main_page_toc.
Print Link [webhelp_print_link]
webhelp_print_link
element must be specified in the template file. It can be used in all four types of template pages:
webhelp_print_link element can be specified as
in the following
example:<whc:webhelp_print_link
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class: wh_print_link.
Include HTML files [webhelp_include_html]
include_html element must be specified in the template file. It can be
used in all four types of template pages:
In the template file, the include_html element can be specified as in the
following example:
<whc:include_html href="${wh.param}"/>
Where the href can have the following values:
- any URL - In this case, the file to be included is specified as an URL.
- {$oxygen-webhelp-template-dir}/file_to_include.html - To include resources that are part of the template.
- ${webhelp.param} - To include a resource whose path is specified through a WebHelp transformation scenario parameter. The value of this parameter can be a simple HTML fragment, in which case it will be copied to the output.
Index Terms Link [webhelp_indexterms_link]
indexterms.html). If the published documentation does not contains any
index terms, then the link will not be generated. To generate this component, the
webhelp_indexterms_link element must be specified in the template file.
It can be used in all four types of template pages:
In the template file, the webhelp_indexterms_link element can be specified
as in the following example:
<whc:webhelp_indexterms_link
xmlns:whc="http://www.oxygenxml.com/webhelp/components"/>
In the output, you will find an element with the class:
wh_indexterms_link. This element will contain a link to the
indexterms.html page.
Link to Skin Resources [webhelp_skin_resources]
webhelp_skin_resources
element must be specified in the template file. It can be used in all four types of template pages:
In the template file, the webhelp_skin_resources element can be specified
as in the following example:
<whc:webhelp_skin_resources/>
In the output, you will find a link to the skin resources.