ESGF CoG Administrator Logo
  • ESGF/CoG Administrator Guide Overview
  • ESGF/CoG Administrator Login
  • Node Home Project Setup
  • Home Page Example
  • Data Search Configuration
  • Data Access Control Setup
  • Node Federation
  • Configuring Globus
  • Data Transfer Node Setup
  • Header and Footer
    • Customizing the header and footer
    • The Defaults
    • Overridding the Defaults
    • Example code
  • Google Analytics
  • Notification Header
  • ESGF CoG User Accounts
  • Setup Federation
  • Cron Jobs
  • Restore from Backup
  • “Local Shard” Setup
  • CoG Installation or Upgrade
  • Create an account
  • Authorization for ESGF Data Access
  • Logging in with OpenID
  • Forgot OpenID
  • Forgot Password
  • Update Password
  • Getting Safari to accept the ESGF OpenID certificate
  • Getting Chrome to accept the ESGF OpenID certificate
  • Getting Internet Explorer to accept the ESGF OpenID certificate
  • Getting Firefox to accept the ESGF OpenID certificate
  • CoG Installation from Docker
  • Installation: Prerequisites
  • Installation: Initial setup
  • Installation: Install or Upgrade
  • Installation Testing: Initial Testing of the Installation
  • Installation Configuration
ESGF CoG Administrator
  • Docs »
  • Header and Footer
  • View page source

Header and Footer¶

Customizing the header and footer¶

Release 2.5 of CoG introduced the ability for organizations to create a customized header and footer around their ESGF-CoG installation. These elements allow organizations to brand their installation with organzational logos and links.

The Defaults¶

The CoG distribution comes with a default header and footer that have been only partially customized. Action must be taken to override these defaults.

  • The default files are:

    • cog/templates/cog/common/cog_header_custom.html

    • cog/templates/cog/common/cog_footer_custom.html

  • It is hoped that the specified styling will be retained. This maintains a continuity of styling across federated CoG instances:

    • Institutional logos are on the left.

    • The ESGF logo, which comes with the distribution is on the right.

    • {{site.name}} is automatically added to the header. {{site.name}} is set in the vcog_settings.cfg file (see the installation instructions for details).

    • The color of the banner is set within the cogstyle.css. It shoudl not be overridden.

Figure 1: Screenshot of the default header. Note the placeholder for organizational logos. This is the default as of v2.11 of CoG.

Figure 2: Screenshot of the default footer. Note the placeholder for organizational links.

Overridding the Defaults¶

The default header and footer can be overridden by placing a custom temaplate with the same name under the root level directory /mytemplates/. Note that the /mytemplates directory is the equivilant to the /templates in the path below.

  • COG_CONFIG_DIR=/usr/local/cog/cog_config by default

For example, to override the template /cog/templates/cog/common/cog_header_custom.html and /cog/templates/common/cog_footer_custom.html which come with the distribution, create the two custom files:

  • /usr/local/cog/cog_config/mytemplates/cog/common/cog_header_custom.html

  • /usr/local/cog/cog_config/mytemplates/cog/common/cog_footer_custom.html

Images and other media should be located under the directory /mymedia/ and referenced from within the template as “/mymedia/”.

For example, the file located at /usr/local/cog/mymedia/nasa.jpeg can be loaded by any template as src=“/mymedia/nasa.jpeg” (please note the first leading ‘/’).

Example code¶

  • Several example files come with the distribution.

  • They are located in /resources/noaa/mytemplates/cog/common.

Next Previous

© Copyright 2019, ESGF User Interface Team

Built with Sphinx using a theme provided by Read the Docs.