Prev | Next |
Help Template Files
Enterprise Architect makes use of a series of template files when generating HTML content from your Help model. Each of the template files contains some formatting information, as well as placeholders where generated content will be inserted.
As each model element is rendered, the corresponding template file is loaded into memory and the element data is substituted into the appropriate placeholders. The page content is built up as each element is rendered, until finally, the page content is substituted into the corresponding placeholder in the 'master template' file.
There is a specific template file that corresponds to each type of element available in the Help model, as well as two sample 'master template' files.
All of these template files are provided as a part of Enterprise Architect and will be copied to a sub-folder named 'Templates' in your specified output folder the first time you generate files from your Help model.
It is expected that you will customize the master template file to suit your own needs, however, it is far less likely that you will need to modify the element template files.
You should have a sound working knowledge of HTML before attempting to customize any of the template files.
Master Template File
The master template file is unique, in that you specify the name of the file that you want to use when commencing a generation. You are encouraged to copy and rename this file, and edit it to suit your needs. Essentially, it is used as a container for the generated content and you are free to edit the layout of your content however you wish.
The following table describes the use of the content placeholders that are available for use within a master template file.
TOPIC_TITLE |
This placeholder is substituted with the name of the «HelpTopic» element. In the default content of the master template file, this value is used to set the title of the generated web page. The page title is used by web browsers to label individual tabs in the browser. |
SITE_PATH |
This placeholder is substituted with the value of the 'Site Folder Path', taken from the 'Generate Help' dialog. A typical use would be to create the initial item in the page's breadcrumb navigation control. For example: <li class="home"><a href="#SITE_PATH#/index.html">Index</a></li> |
BREADCRUMB |
This placeholder is substituted with a string of HTML code, that is used to create a breadcrumb style, navigation control. The HTML string is constructed as a list of hyperlinks to the generated pages associated with each of the parent packages under which the current topic resides. The default content in the master template file, wraps this placeholder with <div>, <table> and <ul> tags, that specify the CSS classes required to display the list of hyperlinks as a breadcrumb control. If you want to remove the breadcrumb control, you should remove the entire <div> fragment. |
PREV_LINK |
This placeholder, used in conjunction with the 'PREV_LINK_CLOSE' placeholder, is used to create a button that provides a hyperlink to the web page associated with the 'previous' topic in your Help model. If you do not wish to display 'Prev' and 'Next' buttons, you should remove the entire table fragment that begins with <table class="hnavright"> |
PREV_LINK_CLOSE |
This placeholder is substituted with HTML code that closes the tag that is opened with the 'PREV_LINK' placeholder. |
NEXT_LINK |
This placeholder, used in conjunction with the 'PREV_LINK_CLOSE' placeholder, is used to create a button that provides a hyperlink to the web page associated with the 'previous' topic in your Help model. If you do not wish to display 'Prev' and 'Next' buttons, you should remove the entire table fragment that begins with <table class="hnavright"> |
NEXT_LINK_CLOSE |
This placeholder is substituted with HTML code that closes the tag that is opened with the 'NEXT_LINK' placeholder. |
TOPIC_TEXT |
This placeholder is substituted with a string of HTML text, that makes up the body of the generated web page. The generator processes each of the child elements within a «HelpTopic» element, using the template file that corresponds with the type of each child element and builds a single HTML string that encompasses all of the model content for the current Help topic. |
NAVIGATION |
This placeholder is substituted with a list of hyperlinks, that produces a menu on the left side of the web page, supporting navigation to Help topics that are siblings of the current topic. That is, topics that are at the same level in the model hierarchy. |
HelpTopic
The following table describes the use of the content placeholders that are available for use within the template file named "HelpTopic.html". You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
TOPIC_NAME |
This placeholder is substituted with the name of the «HelpTopic» element. The default content of the template file "HelpTopic.html" uses the Help Topic name as a heading for the page. |
NOTES |
This placeholder is substituted with the Notes of the «HelpTopic» element. The default content of the template file "HelpTopic.html" displays the Notes of the Help Topic immediately following the page heading. |
PAGE_CONTENT |
This placeholder is substituted with the page content generated as a result of processing child elements of the «HelpTopic» element. The default content of the template file "HelpTopic.html" displays this 'page content' following the Notes of the «HelpTopic» element. |
LEARN_MORE |
Currently not used. At this time, this placeholder is substituted with a 'carriage return' character. |
HelpSection
The following table describes the use of the content placeholders that are available for use within the template file named "HelpSection.html". You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
ELEMENT_NAME |
This placeholder is substituted with the name of the element being processed. The default content of this template file renders the element name as a heading for the content generated from the element. |
NOTES |
This placeholder is substituted with the Notes of the «HelpSection» element. The default content of this template file, displays the Notes of the element immediately following the element heading. |
HelpTableNN
The following table describes the use of the content placeholders that are available for use within the set of template files named "HelpTableNN.html". You can edit the content of these files if you need to, but we recommend that you use them without modification - at least to begin with.
You cannot rename these template files - the Help Generator expects to find a file with a name that corresponds to the type of table being processed.
The default content of these template files is constructed such that the element name appears as a heading, followed by any notes associated with the element, then the table follows on with column headings across the top, and the content of the tables rows follows under that.
Placeholder Name |
Description |
---|---|
ELEMENT_NAME |
This placeholder is substituted with the name of the element being processed. The default content of this template file renders the element name as a heading for the content generated from the element. |
NOTES |
This placeholder is substituted with the Notes of the element being processed. The default content of this template file, displays the Notes of the element immediately following the element heading. |
TAGGED_VALUES |
This placeholder is substituted with a generated string of HTML code, that makes up the beginning of the table definition. It includes column headings generated from the element's tagged values named "Column1", "Column2" and, in the case of three column tables, "Column3". |
TABLE_ROWS |
This placeholder is substituted with the HTML string generated by processing the «HelpTableRow» elements that are children of the «HelpTable» element being processed. |
HelpTableRow
The following table describes the use of the content placeholders that are available for use within the template file named "HelpTableRow.html". You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
ELEMENT_NAME |
This placeholder is substituted with the name of the element being processed. The default content of this template file renders the element name in the first (left most) cell of the table row. |
NOTES |
This placeholder is substituted with the Notes of the element being processed. The default content of this template file renders the Notes in the second cell of the table row. |
ROWS_LINKS |
This placeholder is available for use only in the template files for three column tables. It is substituted with hyperlinks generated from data contained in the 'See also' tagged values of the table row element being processed. The default content of this template file renders 'See also' hyperlinks in the third cell of the table row. |
HelpSectionLearnMore
The following table describes the use of the content placeholders that are available for use within the template file named "HelpSectionLearnMore.html". You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
ELEMENT_NAME |
This placeholder is substituted with the name of the element being processed. The default content of this template file renders the element name as a heading for the content generated from the element. Typically, the element would be named "Learn more" |
NOTES |
This placeholder is substituted with the Notes of the element being processed. The default content of this template file, displays the Notes of the element immediately following the element heading. |
HelpSlideshow
The following table describes the content placeholders that are used within the template file named "HelpSlideshow.html". The default content of the template file 'HelpSlideshow.html', arranges the generated HTML content as a table having a single row with two columns. An icon representing the slideshow is placed in the first column. The second column contains the element name written as a heading, with the element Notes placed underneath the heading. You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
FIRST_LB_IMAGE |
This placeholder is substituted with HTML code that opens the tags used for the lightbox style control and specifies the first image of the slideshow. |
TAGGED_VALUES_ICON |
This placeholder is substituted with the HTML code that specifies the image to display as the slideshow icon. |
FIRST_LB_IMAGE_END |
This placeholder is substituted with HTML code that closes the tag for the first slideshow image |
TAGGED_VALUES_IMAGE |
This placeholder is substituted with HTML code that lists all of the subesquent images in the slideshow. |
ELEMENT_NAME |
This placeholder is substituted with the name of the element being processed. The default content of this template file renders the element name as a heading, to the right of slideshow icon. |
NOTES |
This placeholder is substituted with the Notes of the element being processed. The default content of this template file, displays the Notes of the element immediately below the element heading. |
HelpSystemVideo
This table describes the use of the content placeholders that are available for use within the template file named "HelpSystemVideo.html". You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
VIDEO_TITLE |
This placeholder is substituted with the value of the element's tagged value named 'VideoTitle'. The default content of this template file, displays the title as a heading above the HTML video control. |
VIDEO_URL |
This placeholder is substituted with the value of the element's tagged value named 'VideoURL'. This is used within the HTML 'video' tag, to provide the URL value for the 'src' attribute of the 'source' tag. The default content of this template file, displays a full width video control. When the 'play' button is clicked, the control will load and play the video file found at the specified URL. |
VIDEO_TYPE |
This placeholder is substituted with the value of the element's tagged value named 'VideoType'. This is used within the HTML 'video' tag, to provide a value for the 'type' attribute of the 'source' tag. |
HelpVideoLocal
The template file 'HelpVideoLocal.html' is currently not used.
Placeholder Name |
Description |
---|
HelpSectionDiagram
This table describes the use of the content placeholders that are available for use within the template file named "HelpSectionDiagram.html". You can edit the content of this file if you need to, but we recommend that you use it without modification - at least to begin with.
You cannot rename this template file - the Help Generator expects to find a file with this name.
Placeholder Name |
Description |
---|---|
IMAGE_LOCATION |
This placeholder is substituted with the generated path name for the diagram image. The generated HTML includes only the path name for the file containing the diagram image. It does not include the element name or notes. |
Notes
- The content placeholders in the template files are (and must remain) surrounded by a single "#" character front and back, in order that the Help Generator will recognize them as placeholders.