Publications Office widgets
What does this service offer?
Widgets are web components that allow you to embed content published by the Publications Office Portal (op.europa.eu - EU Law, EU publications and Summaries of Legislation) into your website or blog without duplicating the content. Publications Office widgets are free and easy to use.
There are five different types of widgets provided by the Publications Office:
- Search form: Allows users to integrate the Publications Office Portal search as a service on their websites.
- Search result: Displays dynamically generated search result.
- Selected publications: Displays a list of preselected publications or legal documents.
- Publication detail: Displays a single publication or legal document.
- Organization detail: Displays the organizational structure of a European Institution and the hierarchical positions of individuals.
Publications Office Widgets are user-friendly and support all 24 official languages of the European Union. You can customize the widgets to fit your needs using an intuitive interface and a zero-code approach.
Benefits
Types of widgets
How it works
The Publications Office widgets are seamlessly integrated into your website using JavaScript. The widgets are using JavaScript to invoke services from the Publications Office portal, retrieving content which is then dynamically rendered on your page. This integration enables you to provide dynamic, up-to-date and trustworthy content to your users without copying or hosting content on your website.
Widgets for EC webmasters
If you are an EC Webmaster or if you are already using the Webtools Smart Loader then you can use the JSON script to easily integrate the Publications Office widgets on your page.
Step 1: include the reference to the Webtools Smart Loader (load.js) in the head of your pages if it is not there already
Example
<head> <script defer src="https://webtools.europa.eu/load.js" type="text/javascript"></script> </head>
Step 2: create your widget and copy the json script in your page in the location where you want the widget to be rendered.
Example
<script type="application/json"> { "service": "opwidget", "widgetId": "1073" } </script>
The automatic language selection is already marked in the script for EC webmasters:
- When the widget is multilingual the script says "lang": "auto"
- When the widget is only for one specific language the script says “lang”: ”SELECTED_LANGUAGE”
Note: Webtools Smart Loader supports the Publications Office widgets as “opwidget” service.