Associating Template Pages With Topics

You can associate a template page with individual topics, which is beneficial if you want some topics to use one template page and other topics to use a different template page.

How to Associate a Template Page With Topics via the Properties Dialog (Recommended)

  1. Do one of the following, depending on whether you want to associate a template page with a single topic or multiple topics:

    • Single Topic If you want to associate a template page with a single topic, right-click the topic file in the Content Explorer and choose Properties. The Properties dialog opens.
    • Multiple Topics If you want to associate a template page with many topics, do this:

      1. Select View > File List.
      2. (Optional) From the Filter drop-down list in the local toolbar, you can select Topic Files to limit the results in the grid to topics only.
      3. Select the files to which you want to apply a stylesheet. You can hold the SHIFT key to select a range, or you can hold the CTRL key to select individual items.
      4. In the local toolbar, click Display properties for the selected item.. The Properties dialog opens.
  2. Click the Topic Properties tab.
  3. Click the Template Page field and select a template page.
  4. Click OK.

Example You have a template page called "Primary," which you want most of your online topics to use. This template page is set up so that in the output most topics will display breadcrumbs and a search bar at the top of each page, a menu on the side, and some copyright text at the bottom.

But you also have a secondary template page called "Special." This template page includes the same things as the Primary template page, but you also have your company logo under the copyright text. You want 8 specific topics to use the Special template page.

To accomplish this, you associate the Primary template page with the target (see Associating Template Pages With Targets). But for the other topics, you can open the Properties dialog and choose the Special template page.

How to Associate a Template Page With Topics via the mc-template-page Property

  1. Create the template pages that you need.
  2. Open your stylesheet (in the Advanced view) and select the html style on the left side of the editor.
  3. Create a new class. When you are finished it will be placed under the html style. See Creating Selectors.
  4. Select your new class on the left side of the editor.
  5. In the upper-right corner of the Stylesheet Editor, click the Show field and select Show: Assorted Relevant Properties.
  6. To the right of the mc-template-page property, click Display more options., then select the template page to be associated with it.

    Note If you are working in Group View, this property can be found under Unclassified.

  7. Click Save the active file. to save your work.
  8. Open a topic that you want to associate with that template page.
  9. Make sure the structure bars are turned on. See Structure Bars.
  10. To the left of the topic content, right-click the html bar.
  11. In the context menu, select Style Class and choose the html style class that you want to apply.

    Note You will not see any styles from this list until you create a class for the html style in the Stylesheet Editor.