-
Notifications
You must be signed in to change notification settings - Fork 14
Portal Branding
This guide assumes that you have set up your AODN stack as per https://github.com/aodn/aodn-portal/wiki/Setting-up-AODN-stack-without-Chef
The Portal webapp is running in /usr/share/tomcat/webapps/portal
. Navigate to this directory.
Go to the directory ./conf/Catalina/localhost
and create the file portal.xml
. This is an apache context xml file. The name of the file must be the tomcat app folder name (by convention).
Set permissions on the file
chmod 755 portal.xml
chown tomcat.tomcat portal.xml
(where tomcat is the default tomcat user)
Edit the file to create the environment variable for portal groovy config:
<?xml version='1.0' encoding='utf-8'?>
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Environment name="aodn.configuration" value="/usr/share/tomcat/portal_config/Portal.groovy" type="java.lang.String" override="true"/>
</Context>
Create the file Portal.groovy
in the location specified in the aodn.configuration
environment variable as above.
Set the file permissions and ownership:
chmod 755 Portal.groovy
chown tomcat.tomcat Portal.groovy
Edit the file to set branding config. See example file https://github.com/aodn/aodn-portal/blob/master/grails-app/conf/Config.groovy
The code block below contains the default portal branding settings. Adjust these as appropriate to the paths and/or URLs of your logos.
portal {
siteHeader = "My Portal Header"
motdUrl = "message-of-the-day"
logo = "path-to-main-logo.png"
secondaryLogo = "path-to-secondary-logo.png"
icon = "path-to-my-favicon.ico"
localThemeCss = "my-theme.css"
contactEmail = "[email protected]"
siteAcronym = "MY_ACRONYM"
emailSignature = "Kind regards,\nThe Team."
emailFooter = "My Email Footer"
conditionOfUse = "my-terms-of-use-link"
header {
externalLinks = [
[
linkText: "Help",
tooltipText: "Portal help files",
href: help.url
]
]
}
}
When you have finished modifying the config, restart tomcat to pick up the config changes:
sudo systemctl restart tomcat