phpCAS latest release v2.1.2-1
last update 31-August-2007 11:53AM

CAS GH HTML rendering configuration

HTML rendering can be configured using templates.

Four customizations can be made by simply editing a properties file:

  • the language: english by default, other possible values are french and greek;
  • the logo (a URL);
  • the colors and the fonts.

How can I use an existing template?

For instance, the default template is esup-portail.org. It is defined by the /custom/cas-server-render/esup-portail.org folder, and the /custom/cas-server-render/esup-portail.org.properties file. Usage of this template is specified in the /properties/build.properties file:

#
# Yale ITS CAS Server configuration
#

# version used (do not modify)
cas-server.version=2.0.11 # HTML rendering cas-server.render=esup-portail.org

Note: the esup-portail.org template us used by default if the ${cas-server.render} property is not set.

How is a template defined?

Templates are defined in the /custom/cas-server-render/ folder, as a properties files (the name of the template suffixed by .properties) and an optional folder (the name of the template).

For instance, the content of the /custom/cas-server-render/esup-portail.org.properties is the following one:

#
# ESUP-Portail rendering customization 
#

cas-server.lang=en
cas-server.html.font=Arial,Helvetica cas-server.html.caption=ESUP-Portail Central Authentication Service cas-server.html.title.text=Central Authentication Service cas-server.html.title.color=white cas-server.html.logo.url=esup-portail.png cas-server.html.logo.width=182 cas-server.html.logo.height=68 cas-server.html.body.bgcolor=#0044AA cas-server.html.box.bgcolor=#FFFFFF cas-server.html.error.color=red cas-server.html.credentials.color=#FF9999 cas-server.html.warn.color=#003399 cas-server.html.institution.name=ESUP-Portail consortium cas-server.html.institution.url=http://www.esup-portail.org cas-server.html.institution.url-pattern="https://xxx.esup-portail.org" cas-server.html.institution.web-pages=Secure ESUP-Portail web pages

As you can see, four customizations can be made by simply editing a properties file.

Note that if a relative url is used for the logo, it is relative to the /web folder of the CAS server sources; for instance, esup-portail.png is located in the /custom/cas-server-render/esup-portail.org/web folder.

How can I create a new HTML rendering template?

simply create a new properties file in the /custom/cas-server-render/ folder (the name of your template, suffixed by .properties). You can optionally create a folder (all the files you put in this folder will be copied to the CAS server sources).

Alternatively, you can duplicate an existing template. Two other templates are given as examples:

  • its.yale.edu: the look of the original Yale ITS CAS server distribution;
  • univ-rennes1.fr: a french customization.

If you think your template can be interesting for other users, please share it on the casgeneric-users@esup-portail.org mailing list.

How do I change the language?

As seen above, you can use an existing language by setting the ${cas-server.lang} property in /properties/build.properties.

Existing languages are defined in /custom/cas-server-lang/ folder; to add a new language, simply duplicate an existing sub-folder (corresponding to an existing language) and modify the included files.

Your translations can be used by others, please share them on the casgeneric-users@esup-portail.org mailing list.

 
SourceForge.net Logo

Copyright © 2002-2004 - ESUP-Portail consortium