Learn how you can use a master page in RoboHelp to quickly customize the layout of your topic.

What is a master page

An HTML page comprises three elements: content, layout, and styling. For single sourcing, it is best to separate content from layout and styling. Although CSS files separate styling from content, layout remains embedded in the HTML code. By using master pages, you can separate layout and styling from content.

A master page contains layout information and is associated with a CSS file. A master page is a template for HTML topics. You can define the placeholders for header, footer, and topic. You can include breadcrumbs, topic TOC, snippets, variables, fields, and symbols. You can also apply condition tags to a master page.

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 topic placeholder content is placed in the resulting topic. If you apply a master page to an existing topic, the topic placeholder content is ignored. In this case, actual content of the topic replaces the topic placeholder in the master page at the time of preview and generation.

The layout information defined in master pages is not visible in Author view. You can see the layout when you generate output or preview an associated topic. The topic content is placed in the topic placeholder, and the layout is inherited from the master page. All placeholders defined in the master page are also populated with relevant information when you generate output. 

You can also import and export master pages to use across projects.

Add a master page

You can add a master page in two ways:

  • From the Master Pages panel:
    When you add a master page using the Master Pages panel or upgrade to RoboHelp 2019 from a previous version, by default, the master page files are stored in the assets/masterpages folder in the Contents panel.
  • From the Contents panel:
    When you add a master page to a different project folder in the Contents panel, the master page files are stored in that project folder. 

Irrespective of the location in which you add a master page, access and manage all master pages in your project from the Master Pages panel. 

To add a master page:

  1. Click the Author tab at the left side of the Standard toolbar.

    The Author view opens.

  2. To add a master page through the Master Pages panel:

    1. In the Author toolbar, click Master Pages. The Master Pages panel opens.
    2. Click  in the upper-right corner of the panel. 
      The New Master Page dialog box opens.

    To add a master page through the Contents panel:

    1. In the Author toolbar, click Contents. The Contents panel opens.
    2. In the Contents panel, right-click a folder, or click Options (), and choose New > New Master Page.
      The New Master Page dialog box opens.
  3. In the New Master Page dialog box, specify the name of the master page and click Done.

    The new master page is added to the Master Pages panel and placed in alphabetical order. 

  4. Click the Save All icon  at the left side of the standard toolbar.

Edit a master page

You can easily customize a master page to suit your liking. To edit a master page:

  1. Click the Author tab at the left side of the Standard toolbar.

    The Author view opens.

  2. In the Author toolbar, click Master Pages. The Master Pages panel opens.

  3. In the Master Pages panel, against the master page you want to customize, choose Options () > Edit

    The master page opens as a tab, displaying the header, topic, and footer placeholders.

    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 topic placeholder in the master page at the time of preview and generation.

  4. Customize the header, topic, and footer placeholders as required by inserting breadcrumbs, variables, snippets, topic TOC, fields, and symbols. You can also apply condition tags to the master page.

    For more information, see the following resources:

  5. To insert a paragraph between placeholders, hover the pointer above the appropriate placeholder and click the Insert paragraph indicator.

    master_page
    Insert paragraph indicator
  6. Click the Save All icon  at the left side of the standard toolbar.

You can insert breadcrumbs placeholder in an open master page. The placeholder shows the automatically generated breadcrumbs at the time of generation of Help topic. The breadcrumbs are generated based on the TOC. 

  1. In the standard toolbar, click the Insert Breadcrumbs Placeholder icon . The breadcrumbs placeholder is inserted at the location of the pointer.

    breadcrumbs_placeholder
    Breadcrumbs placeholder
  2. Click the breadcrumbs placeholder to set its properties.

    The Properties panel > General tab displays the Type as Breadcrumbs

  3. In the General tab, do the following:

    Home Page Name Specify the name of the home page of your Help. 

    Separator Specify or select a separator to separate the elements in breadcrumbs. The default is >.

    Prefix Label Specify a label that is prefixed to the breadcrumbs. For example, Navigate to:.

  4. Click the Save All icon  at the left side of the standard toolbar.

Insert and customize a topic TOC

You can insert a topic TOC in an open topic or master page. The topic TOC placeholder shows the automatically generated topic TOC at the time of generation or preview of a Help topic. You can define the exact location and format of the topic TOC while designing the layout of the master page. You can also customize the heading levels as required. 

To insert a topic TOC in an open topic or master page:

  1. In the standard toolbar, click the Insert Topic TOC Placeholder icon . The topic TOC placeholder is inserted at the location of the pointer.

    topic_toc
    Topic TOC placeholder
  2. Click the topic TOC to set its properties.

    The Properties panel > General tab displays the Type as TOC Caption or TOC Body, depending on the location of the pointer. 

    You can apply inline formatting using the General tab or a style from your style sheet using the Styles tab.

  3. To apply inline formatting, in the General tab, do the following:

    For Type: TOC Caption

    • Edit the default caption in the Caption field. 
    • Use various Font options to change the font family, style, size, color, and more. 
    • Use the Background options to change the background shade, and add and customize the dimensions of the background image. 

    For TypeTOC Body

    • In the Use Headings field, use the from and to drop-downs to customize the heading levels. The default range of heading levels is 2 – 6. You can include heading 1 also.
    • Clear the Show TOC in expanded form field if you do not want to view the TOC in expanded form.
    • Use various Font options to change the font family, style, size, color, and more. 
    • Use the Background options to change the background shade, and add and customize the dimensions of the background image. 
  4. To apply a style from your style sheet, in the Styles tab, do the following:

    For Type: TOC Caption

    • Select Paragraph Styles from the styles drop-down list. 
    • From the list of styles, select a style to apply it.

    For TypeTOC Body

    • Select List Styles from the styles drop-down list. 
    • From the list of styles, select a style to apply it.
  5. Click the Save All icon  at the left side of the standard toolbar.

Insert a field

You can insert system or project variables, such as date, time, project title and more, as fields in an open topic or master page. Fields are read-only, and not customizable.

To insert a field in an open topic or master page:

  1. In the standard toolbar, click the Insert Variables/Snippets/Fields icon , and then click Field. The Fields dialog box opens.

  2. In the Fields dialog box, use the drop-downs  to select a field and its format. For example, if you select the Field as Date, select the Format as default, DD-MM-YYYY, or MM-DD-YYYY.

  3. Click Insert. The selected field in the selected format is inserted at the location of the pointer.

  4. Click the Save All icon  at the left side of the standard toolbar.

Insert a symbol

You can insert a symbol in an open topic or master page. To do so, click the Insert Symbol icon  in the standard toolbar, and select a symbol from symbols displayed. The selected symbol is inserted at the location of the pointer.

Create a topic with a master page

While creating a topic, you can associate it with a master page. For more information, see Create a topic.

Associate a topic with a master page

You can associate an existing topic with a master page by editing the topic's properties. For more information, see Set topic properties.

Create a duplicate master page

You can create a duplicate copy of a master page with a different name and modify it to suit your requirements.

  1. Click the Author tab at the left side of the Standard toolbar.

    The Author view opens.

  2. In the Author toolbar, click Master Pages. The Master Pages panel opens.

  3. In the Master Pages panel, against the master page you want to duplicate, choose Options () > Duplicate

  4. In the Duplicate Master Page dialog box, specify the name of the duplicate copy and click Done.

    The duplicate master page is added to the Master Pages panel and placed in alphabetical order. 

  5. Customize the duplicate master page if necessary. For more information, see Edit a master page.

  6. Click the Save All icon  at the left side of the standard toolbar.

Delete a master page

To delete a master page:

  1. Click the Author tab at the left side of the Standard toolbar.

    The Author view opens.

  2. In the Author toolbar, click Master Pages. The Master Pages panel opens.

  3. In the Master Pages panel, against the master page you want to delete, choose Options () > Delete

  4. In the Confirm dialog box, click Yes to confirm the deletion.

    The master page is deleted. 

  5. Click the Save All icon  at the left side of the standard toolbar.

Locate a master page file in your computer

To see the location of a master page file in your computer:

  1. Click the Author tab at the left side of the Standard toolbar.

    The Author view opens.

  2. In the Author toolbar, click Master Pages. The Master Pages panel opens.

  3. In the Master Pages panel, against the master page you want to locate, choose Options () > Show in Explorer

    Windows Explorer opens to display the master page file and its location.

Esta obra está licenciada sob uma licença não adaptada da Creative Commons Attribution-Noncommercial-Share Alike 3.0  As publicações do Twitter™ e do Facebook não são cobertas pelos termos do Creative Commons.

Avisos legais   |   Política de privacidade online