ClickHelp User Manual

Custom Header and Footer FAQ

ClickHelp User Manual/ClickHelp FAQ/Custom Header and Footer FAQ

Frequently asked questions about customizing header and footer.

Question: How to edit headers and footers visually? 

Create the My Footer topic which will be used as a header/footer snippet. Then, open Topic Master Page and add the following code to a header and/or footer where a snippet URL is a link to the topic that you want to add:

HTML
<ch:snippet url="/articles/project-making-robots/my-footer"/> 

The topic content will be added to the header/footer as a snippet referencing the topic you created, so you will be able to change the header/footer visually via editing the My Footer topic in the topic editor.

How to add common text information like a product name or support phone number to headers/footers? 

You can use Variables for that. Header/footer content becomes a part of topic markup when publishing and it's handled as regular topic markup, so you can use both project and global variables there. Just open Topic Master Page and add the following code to a header and/or footer:

HTML
<ch:var name="supportEmail"/> 
How to add breadcrumbs, See Also blocks or other automatic navigation elements to every topic of a project? 

Open Topic Master Page and add the following code to a header and/or footer:

HTML
<ch:nav type="breadcrumb" includeSelf="true" class="CHBreadcrumb"/>

You also can style the breadcrumb in a centralized way via the CHBreadcrumb CSS class in project styles or with inline CSS:

Add the Breadcrumb markup to the Topic header HTML in the Topic Master Page settings

Here is the result - grey line for the breadcrumbs container:

The Breadcrumb in the topic header in the Reader UI

This way, you can add different navigation blocks such as links to top, next, previous topics, and See Also.

How can I create different headers/footers for different publications from a single project? 

You can use conditional blocks inside the Master Page fields. For example, to exclude content from documents with the PrintedDoc output tag, you can use excluding blocks:

HTML
<ch:exclude tags="PrintedDoc">support@email.com</ch:exclude>

As a result, documents published with other tags will include the support e-mail address, and the printed version will not have it in the header or footer.

If you want to see some content only in documents with the PrintedDoc output tag, you can use an including block in the same way:

HTML
<ch:include tags="PrintedDoc">support@email.com</ch:include>
How to remove the default header?  The topic header in the Reader UI

Answer: In order to remove it, go to Tools  Portal Setting  Branding  Reader Interface, and uncheck the Show topic header box. Note that the changes apply to reader UI only, so you will need to log out or open the portal in the incognito/private browsing mode to see the effect.

The Show topic header in the Topic Viewer checkbox in the Reader Interface settings
How can I adjust margins and spacing around the topic body area? 

You can create a special wrapper DIV element around the topic content, and control the margins through the styles of this container. To achieve this, open the div tag in a Master Page header and close it in the Master Page footer, as it's shown on the screenshot below.

Add special wrapper DIV elements to the topic header/footer field in the Topic Maser Page settings
Do header/footer settings affect my existing publications? 

Publications have their own header/footer settings, which are not affected by global settings. When you publish a project, the publication gets a "snapshot" or a copy of the current header/footer settings applied to each topic content. When the publication is created, the headers/footers become a part of your publication topics content and therefore cannot be updated in a centralized way after that. In order to update headers/footers in your publication, you should republish your project using the Update mode. If you republish your document through the Incremental Update mode, you'll add new articles with new headers/footers but you will not upgrade the old ones.

How are headers/footers handled during publishing? 

Header/footer content is added before/after your topic content, so it is handled like regular topic content and may contain any dynamic elements (snippets, variables, conditional blocks, etc.) a topic may contain. A newly created publication gets the Use Global Settings box unchecked and its header/footer settings cleared in master page settings.