header.vm - Fluid Topics - 3.7

Fluid Topics Configuration and Administration Guide

Category
Reference Guides
Audience
public
Version
3.7

The header.vm defines default and customized headers for a Fluid Topics portal.

The following lines show an example of header.vm file:

<div class="my-header">
#if ($isAuthenticated)
<div class="header-right authenticated">
Welcome <span class="username">$user.displayName</span> !<br />
Your email is <span class="email">$user.emailAddress</span>.<br />
#foreach( $key in $user.authenticationIdentifiers.keySet() )
Your $key id is <span class="id-$key">$user.authenticationIdentifiers[$key]</span>.
#end
</div>
#else
<div class="header-right not-authenticated">
You are not authenticated.
</div>
#end
</div>

The following lines show the custom.less file corresponding to the header.vm previously set:

@tenantCustomHeaderHeight: 100px;
.my-header {
background: black url('http://my_site.fluidtopics.com/public/images/sky-banner.jpg') no-repeat;
height: @tenantCustomHeaderHeight;
width: 100%;
}
.my-header .header-right {
float: right;
color: grey;
margin: 10px;
text-align: right;
font-family: 'open-sans',sans-serif;
font-size: 0.9em;
}

The header in the Fluid Topics portal is now customized:

Homepage dispalyed with a custom header

Headers can also be defined according to languages.

File location

user@host:/usr/local/afs7/conf$ tree
.
└── conf.xml

user@host:/usr/local/afs7/Fluid-Topics/conf$ tree
.
├── -
│ ├── mongo.conf.json
│ └── ws.conf.json
└── $TENANT_ID
├── conf.json
├── header.vm
├── pdf_templates
│ └── $TEMPLATE_DIRECTORY
│ └── pdf-template.vm
├── public
│ ├── custom.js
│ └── custom.less
└── vhost.conf.json