Associating Master Pages with Topics
You can associate a master page with individual topics, which is beneficial if you want some topics to use one master page and other topics to use a different master page. This can be accomplished through the use of topic styles (i.e., classes of the html style) and the mc-master-page property.
Example
You might want most topics in your project to use the same master page (to display the same text at the bottom of each topic). However, maybe you want a select few other topics to use a different master page. For the majority of the topics, you can simply apply the main master page to the target. But for the other topics, you can use a topic style. For example, you can create a class for the html style in your stylesheet, naming it "SpecialMasterPage" (i.e., html.SpecialMasterPage). Then you can modify the "mc-master-page" property for that class so that it is associated with the secondary master page. Finally, you can apply the html.SpecialMasterPage style to the topics that you want to be associated with that master page.
- Create the master pages that you need. See Creating Master Pages.
- Open your stylesheet (in the Advanced view) and select the html tag on the left side of the editor. See Opening Stylesheets.
- Create a new class. When you are finished it will be placed under the html tag. See Creating New Style Classes.
- Select your new class on the left side of the editor.
- In the upper-right corner of the Stylesheet Editor, click the Show field and select Show: Assorted Relevant Properties.
- Click the cell to the right of the mc-master-page property and select the master page to be associated with it.
- Click
to save your work. - Open a topic that you want to associate with that master page. See Opening Topics.
- At the bottom of the XML Editor, click
to turn on the structure bars. See About Structure Bars. - To the left of the topic content, right-click on the html bar.
-
In the context menu, select Style Class and choose the style 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.