next
previous
items

Template Service API V1 (deprecated)

Page Last modified 25 Jun 2012
2 min read
This is an old version, kept for reference only.

Go to latest version
This API is used to integrate a website into the EEA standard design.
  • The API is used together with the EEA main template
  • Parameters which apply to all calls: site (id of the site e.g. 'eionet', 'eper' etc... 'default' means eea site). Template will fallback to default EEA site when no parameter is passed.

Standard API (ver. 1.1)

getRequiredHead
This method returns the required HTML head with common merged JS and CSS declarations.
http://www.eea.europa.eu/getRequiredHead
  • Disabling JQuery: JQuery Ajax library can be disabled in template service by sending argument jsdisable='jquery' to getRequiredHead. this is recommended if you intend to use another Ajax library like Dojo.

 
getHeader
This method returns the required header. Optional parameter "tabselected" in order to show one of the top navigation tabs as selectede. This can have one of the following values: products, themes, pressroom, about-us. Most sites will use "?tabselected=products", in order to show the site as part of the EEA products section.
http://www.eea.europa.eu/getHeader
getFooter
This method returns the required footer.
http://www.eea.europa.eu/getFooter
getBaseBreadcrumb
This method returns the base breadcrumb.
http://www.eea.europa.eu/getBaseBreadcrumb
getSubNavigation
This method returns the second level navigation (used on the left column). Extra required parameter "menuid". This can have one of the following values: products, themes, pressroom, about-us.  Optional parameter "selectedsubmenuid". The submenu item id which is supposed to look as selected. Optional parameter "relativeurls"=['yes'|'no']. Default is 'no'.
http://www.eea.europa.eu/getSubNavigation
getSitemap
This method returns the sitemap for a specific site.
http://www.eea.europa.eu/getSitemap

 

I18N: Translated template

In order to get a translated version of the EEA template, please add the 2-letters ISO 639-1 language code into the URL call. For example, to get the header in Italian you would call the header like this: 

The language code is used, it must be used consistently on all the calls, in order to not mix languages.

 

Performance and caching

All the template service calls are cached by a proxy cache system (squid) at the EEA servers. This improves the response time from EEA.

However we do not reccomend to rely solely on the EEA template service when thinking about performance. We strongly recommend you locally cache each call to the template service and then provide a way to EEA for invalidating and refreshing your local cached template.

For example, you should provide a URL similar either as parameter http://myproject.eea.europa.eu/?refreshtemplate=1 or page http://myproject.eea.europa.eu/refreshtemplate.

This will allow EEA to refresh the templates on all sites when a new template and CSS is available. In this way all sites will stay synchronized with latest design and main navigation.

 

 History

Version 1.1 -07 Sep 2010

 

Changed base URL from http://webservices.eea.europa.eu/templates to http://www.eea.europa.eu. Old urls will be redirected.

 

Version 1.0 - 2005

Initial REST API release

 

Permalinks

Geographic coverage

Document Actions