— This feature is available in the Professional, Professional Plus, and Enterprise Editions. Learn more
or contact LabKey
To create a custom header that appears on all pages throughout the site, place a file named _header.html in any module you will include in your server. Place it at the following location:
The header is written as an HTML fragment, without the <head> or <body> tags. The file can render any kind of HTML content, such as links, images, and scripts. It is also responsible for its own formatting, dependencies, and resources.
The following _header.html file adds a simple banner message alongside the LabKey logo. Create a new .html file in the location described above, and use this content.
<p align="center" style="color:white">
<span class="fa fa-flag"></span> Custom Header Appears Here <span class="fa fa-flag"></span>
In this example, the header file was placed in the resources/views directory of the "HelloWorld" module created in our module development tutorial
. If _header.html files are defined in several modules, you can select which one to display within the admin console.
- Go to (Admin) > Site > Admin Console.
- Click Admin Console Links.
- Under Premium Features, click Configure Header.
- Check the box to Show HTML header.
- Select the module in which the header is defined.
- Click Save.
The new header will appear at the top of every page.