Including chapter or section information in page headers
In addition to page numbers, headers and footers often include the name or number of the chapter or section. Because these names and numbers change from one chapter or section to the next, you need to use a field that displays information relevant to each page.
Click Insert > Fields > Other to open the Fields dialog box (Figure 213).
On the Document page, select Chapter in the Type list. The Format list now shows four choices.
The Layer box determines which outline level is displayed in the field. For example, Layer 1 always displays the most recently found heading that has the paragraph style selected for Level 1 in the Outline Numbering dialog box, Layer 2 displays the most recent heading with the paragraph style selected for Level 2 in outline numbering, and so on.
A Chapter field in a page header always picks up the highest heading level on a page, even if you have specified a lower level in the Layer box. For example, if a page has a Heading 1 and a Heading 2 on it, then a Layer 2 Chapter name field in the header of that page will display the Heading 1 paragraph, not the first Heading 2 paragraph, as intended.
In a footer, the layers work as intended.