Template Service API V1 (deprecated)
- 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)
- This method returns the required HTML head with common merged JS and CSS declarations.
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.
- 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.
- This method returns the required footer.
- This method returns the base breadcrumb.
- 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'.
- This method returns the sitemap for a specific site.
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.
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.
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
For references, please go to www.eea.europa.eu/soer or scan the QR code.
This briefing is part of the EEA's report The European Environment - State and Outlook 2015. The EEA is an official agency of the EU, tasked with providing information on Europe’s environment.
PDF generated on 26 Nov 2015, 05:55 PM