Using Masterpages for Printed Output
There is one confusing issue when using Flare (or Blaze) to create printed output, and that is the use of masterpages. Okay, there may be more than one, but I’m only talking about one confusing issue this time.
We start using Flare and get stuck into creating our content. It’s straight forward enough. You create a topic and start adding content to the topic. Add words, pictures, tables, links, lists, and so on. Format the topic - using a stylesheet is best. And, because the topic is saved as HTML, you can open it in a browser to view it. In fact, you can send the topic to anyone who can open it and view it.
So, we are happy with our topic. It makes complete sense, there are no spelling or grammar errors and it looks sensational! Let’s create some output!
All targets have a default masterpage. You set it by opening the target, selecting the advanced tab, and selecting your masterpage from the drop down list. Of course, this implies you’ve created a masterpage, but if you haven’t you can add one easily. Just use the Project -> Add Masterpage… menu commands, which opens a dialog where you can select the “factory” masterpages or one you’ve created and saved in the “My Templates” directory. And, for online help, default masterpages seem to work fine.
If you look at any printed documentation, particularly the header and footer on each page, you will notice something. Most documents that have more than a couple of pages and several sections, also have different header and footer styles throughout the document. It may be something simple, like the section name appears in the header, or it may be the page numbering suddenly appears on the 7th page but the numbering starts at 1, after the front matter. It may be the front matter uses roman numerals and the main body uses arabic. Whatever.
Flare allows you use different headers and footers by adding the header and footer to a masterpage. You need a different header and footer layout? Add it to a new masterpage and apply it to the topic. Flare will keep using that masterpage until you specify another.
Of course, you’re not restricted to header and footer with your masterpage. You can add body content as well.
A good example of body content on a masterpage is “breadcrumbs”. What are breadcrumbs? Well, at the top (or bottom, but normally top) of online help you might see “You are here: Introduction - About XYZ”. You know what I mean - you’ve seen it before. These are breadcrumbs, they show the navigation path to get where you are in the help system. Remember the story of Hansel and Gretel? They left a trail of breadcrumbs they were going to follow back. (Of course, that didn’t work, but that’s another story entirely.)
Setting up your masterpage is easy. The supplied masterpages are a good place to start. Sure, they use tables for layout, which might not be best practice for web pages, but it is a proven formula for printed (i.e. Microsoft Word) output.
Lets look at the printed doc masterpage that comes with Flare. Click the Project menu, then select Add Masterpage… Use the resulting dialog box to select the Printed Doc Masterpage from the factory templates. Add a filename, something like printed, and click the OK button. A new masterpage, named printed.flmsp (for Flare Masterpage) will open.
If you look at the top line you will see the header for an odd page. Change the text “Odd Page Heading” to something else - your printed output would look strange with the header saying “Odd Page Heading” after all. You can replace “Chapter Title” as well.
PageNumber is a system variable, obviously it will substitute a page number when your output is compiled.
If you hold your mouse over the block at left that says Madcap… the tooltip says <Madcap:pageheader> class:oddpage. If you were starting with a blank page you could insert a page heading of the odd page class by Insert -> Proxy -> Page Header… and selecting odd page from the stylesheet class.
The even page header is similar. Notice the page number and chapter number (instead of chapter title) are on the opposite side.
The final header is the first page header. This one doesn’t use a table for format, but just has a centre justified title header.
The footer(s) follow a similar concept - an odd, even, and first page footer are part of the template. Notice the first page has a system variable to insert the system date, formatted in long date format.
If your first page is the same as the rest, you don’t need a first page header, just odd and even. If your pages are the same (for example, just a centre justified page number) you don’t need any footer or header proxies - add the page number to the masterpage.
The last thing to notice is the topic body proxy. If you remember the picture frame analogy used earlier, the body proxy is the hole in the picture frame. When Flare compiles the output, your topic is displayed in the “hole”.
To finish, this is a masterpage I used in a project:

Notice the formatted “Draft” and “Not for Release” text? The page numbers have been moved to the bottom, in the middle on the first page and outside on subsequent pages. There is a variable called “App”, which is defined as “Records Maintenance”. At compile time all instances of App are changed to Records Maintenance.
Finally, a caveat. You can apply a stylesheet to a masterpage. The thing to remember is in the cascade, Flare adds the topic to the masterpage, so any property set in your masterpage stylesheet overwrites the styles from your topic stylesheet.
Hopefully this explains a little bit about the Madcap Flare (and Blaze) masterpage(s).