Master pages

note:    Master pages replace templates in RoboHelp HTML 7 and earlier.

An HTML page is made up of three elements: content, layout, and styling. For single sourcing, the best practice is to separate content from styling and layout. Although CSS files help to separate styling from the content, layout remains embedded in the HTML code. By using master pages, you can separate layout and styling from the content. A master page contains the layout information and is associated with a CSS file.

A master page is a template for HTML topics. You define the placement of headers, footers, and placeholders for the body, breadcrumbs, and topic TOC. Master pages can include snippets and user-defined variables. You can create a topic using a master page or associate an existing topic with a master page. When you create a topic using a master page, the body content is placed in the resulting topic. If you apply a master page to an existing topic, the body content is ignored.

The layout information defined in the master pages is not visible in Design view. However, you do see the CSS of the master page in Design view. You can see the layout when you generate output or a preview. The topic content is placed in the body placeholder, and the layout is inherited from the master page. All placeholders defined in the master page are also populated with relevant informa­tion when you generate output.

You can use tables to create a precise layout where each placeholder is placed in a table cell.

Body placeholder

When you create a topic from a master page, the topic includes content from the master page. Copyright information is an example. When you apply a master page to a topic, actual content of the topic replaces the body placeholder at the time of preview and generation.

note:    When you apply a master page to a topic, the header and footer of the topic are overridden by those of master pages.

Topic TOC placeholder

Shows the automatically generated topic TOC at the time of generation or preview of Help topic. Define the exact location and format of the topic TOC by designing the layout of the master page. By default, the levels allowed for a TOC layout are heading 2 to heading 6.

Breadcrumbs placeholder

Shows the automatically generated breadcrumbs at the time of generation of Help topic. The breadcrumbs are generated based on the TOC. When you preview a topic, actual breadcrumbs links are not generated and only the layout of breadcrumbs is visible.

You can apply conditional build tags to the topic TOC and breadcrumbs placeholders but not to the body placeholder. However, you can apply a conditional build tag to the content inside or outside the body placeholder.


September 30, 2016

Legal Notices | Online Privacy Policy