- Paligo Documentation
- Publish
- PDF Styling
- Headers (PDF)
- Add Content to Header
Add Content to Header
Use the PDF Layout to add content to the header table cells for PDFs.
Note
The header table is shown on all pages, but the header on the front cover does not show text. As a result, the cover header has a fixed height of 0.
To add text, images, or auto-generated content such as page numbers to your header:
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Header and Footer and then Page header.
-
In the Page header category, select Header cells - default (recto page). These settings are for the odd-numbered pages. They will also apply to the even-numbered pages, by default.
-
Use the Page header <column> cell content settings to define what type of content you are going to add to the header. There are separate Page header <column> cell content settings for the left, center and right cells.
Choose from:
-
None - Paligo will not include any content in the cell.
-
Text - Set the cell to contain text that you will define in the Page header <column> cell content: text field.
-
Image - Set the cell to contain an image that you will choose in the Page header <column> cell content: image field.
-
Pagenumber - Adds the page number to the cell.
Note
The page number is only shown in the PDF output if the General > Page > Print page numbers setting is set to Yes (or Default). For details, see Include Page Numbers in PDFs.
-
Page X - Adds the word "Page" followed by the page number to the cell.
-
Page X of Y - Adds current page and total page number to the cell, for example, "Page 6 of 75".
-
Title - Adds the first title element in your content to the cell. Depending on what you publish, this is the title of your publication or a topic.
-
Chapter title - Adds the title element of the "chapter" to the cell. The "chapter" is a top-level topic in your publication.
For example, let's say you have a top-level topic called "Installation" and then lower-level topics for "Install the battery" and "Install the fan unit". In this scenario, all three topics will have "Installation" in the cell, as they are all part of the same "chapter". Topics in a different "chapter" will have a different title in the cell.
-
Section title - Adds the title element of the topic to the cell. For example, if you have an "Install the battery" topic, it will have "Install the battery" in the cell, but other topics will have their title in the cell instead.
-
-
This step only applies if you selected Text as the Page header <column> cell content.
In the Page header <column> cell content: Text field, enter:
-
Plain text
-
A dynamic variable to reference an element in your documentation. A popular use for a dynamic variable here is to reference an element that appears in the publication topic, such as copyright details. We have included an example after this procedure. To find out more, see Dynamic Text Variables.
-
A combination of plain text and dynamic variables
Note
There are separate Page header <column> cell content: Text settings for the left, center, and right cells.
-
-
This step only applies if you selected Image as the Page header <column> cell content.
In the Page header <column> cell content: Image field, use the Upload feature to add the image you want to use. Paligo uploads the image, gives it an auto-generated name, and stores it with the Layout. It is not stored in the Media library.
Note
There are separate Page header <column> cell content: Image settings for the left, center, and right cells.
-
Repeat steps 5-7 to add content to each cell, if required.
-
In the Page header category, select Header cells - verso page.
The Header cells - verso page settings work in the same way as those for the Header cells - recto page, except that:
-
Any settings that you change for the verso page will be used on even-numbered pages.
-
If you leave any verso page settings set to default or empty, Paligo will match them to the same settings on the recto page. This happens during publishing and is not shown on the Layout.
-
-
Select Save.
When you publish content with this PDF layout, Paligo will add the images and text you have selected.
Let's say you have set up your publication topic to include author
and orgname
elements (see Edit a Publication
Topic). You are going to publish to PDF and you want the left cell of your header to contain the organization name.
You edit your PDF layout and set:
-
Page header left cell content to Text
-
In the Page header left cell content: text field, you enter a dynamic variable to reference the
author
>orgname
element. The syntax is:${//d:article/d:info/d:author/d:orgname}$
Notice how the dynamic variable has to reference each element in the path from the top of the publication topic to the element you want to use. So it starts with the top-level
d:article
, which represents the publication topic, then the next level down isd:info
for theinfo
element, followed byd:author
for theauthor
element, and finallyd:orgname
for theorgname
element.
When you publish, Paligo:
-
Looks in the publication topic and finds the text that is inside the
orgname
element. It copies that text. -
Inserts the copy of the text into the left cell of the header table.