NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Introduction

Branding in NBIA is accomplished by editing and or replacing the objects in the branding folders found in /software/common/resources/branding.  The nbia folder contained within is the default branding for NBIA.  The sub folder images contains the customizable images for the application, they include:

  • FNLfCR-LOGO.png
  • footer_usagov.gif
  • Logo-NCIA.jpg
  • nci-header.png
  • nci-link.png
  • NCI-logo-white.png
  • NCICBLOGO.gif
  • white-ncilogo.gif
  • white-nciurl.gif
  • white-nihtext.gif

To use your own images simply replace the image while keeping the same name as the original one in your new folder, and the build will update it accordingly.  At the base level of the folder are the XHTML/properties files that allow customization, the include:

  • appFooter.xhtml - The footer of the application
  • appHeader.xhtml - The header of the application
  • branding.properties - Contains the application name property
  • ccHeader.xhtml
  • footer.xhtml
  • legalRules.xhtml - Legal rules when signing up
  • mainLayout.xhtml 
  • mainLayoutTemplate.xhtml
  • mainLayoutWithoutSessionTimeout.xhtml
  • mainMenu.xhtml
  • ncia_messages.properties - Various messages used in the application
  • nciHeader.xhtml
  • quickLinks.xhtml
  • sessionExpired.jsp
  • siteMap.xhtml
  • slideshow.css
  • styleSheet.css
  • subMenu.xhtml
  • welcome.xhtml
  • welcomeText.xhtml

Building a Branded Version.

To create and build a branded version copy the example nbia folder to a new folder, as an example assume the copied folder is ncia and you plan to make a version named NCIA.  Copy the folder and edit accordingly note the ncia_messages.properties contains much of the applications textual information and branding.properties contains the application names.  Once you have edited the files the edit install.properties and the defaultAHP3.properties in the /software/build directory.  Specifically the branding properties need to be specified, here is an example for naming an application NCIA

##############################################
### New Branding Properties ###
##############################################
branding.appname=NCIA
branding.folder=ncia

Once that is complete, execute the build:all ant target and the new war files will be properly branded.

XHTML/Facelets Basics

For all of the XHTML files that can be specified through the branding process, they MUST start with:

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets">

and they MUST finish up with:

</ui:composition>

Within the composition, almost any XHTML can be specified. 

Entities

The one exception to watch out for are entities such as non-breaking spaces. Including these directly will cause the rendering of the page to fail, and users will see a big mess in their browser. In other words &nbsp; will break rendering. Instead, the entity must be enclosed in a "verbatim" tag. Please note that another namespace is defined in the composition tag (in red below).

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core">
  <f:verbatim>&amp;nbsp;</f:verbatim>
</ui:composition>

Quick Links XHTML

The Quick Links XHTML is imported into the scope of an XHTML table. Any XHTML specified here should be wrapped in a <tr> and at least one <td> element.
For an example see: https://ncisvn.nci.nih.gov/svn/nbia/trunk/docs/deployment/niams_branding/quickLinks.xhtml

Other XHTML

There are no restrictions on XHTML for the welcome title/text or the footer.

  • No labels