Login

Quotes

Categories

ABCDEFGHI
JKLMNOPQR
STUVWXYZ*

Authors

ABCDEFGHI
JKLMNOPQR
STUVWXYZ*

Help

Embed

Project

Imprint

Embedding Quotes

Do you want to display quotes on your website? Here you can find out how to do this with WordPress, Joomla, with the API and via iFrame.

Content Management Systems (CMS)

Joomla! There is a Joomla module for integrating quotes into the CMS Joomla. It is documented here: Help.

WordPress logo There is a WordPress plugin for integrating quotes into the CMS CMS WordPress. It is documented here: Help.

API

An Application Programming Interface (API) is available at: https://api.zitat-service.de. For example, the following link provides a random quote in the English language: https://api.zitat-service.de/v1/quote_html?language=en. With the API Explorer you can view the available parameters, list IDs, and perform tests.

Iframe

You can display the quotes on your page using an inline frame (iframe). The design can be customized using Cascading Style Sheets (CSS). Here's an example:

The iframe code for this integration is:

<iframe src="https://api.zitat-service.de/v1/quote_html?language=en&target=quotes&style=https://www.zitat-service.de/quote.css" frameborder="1" scrolling="auto" width="700"></iframe>

For a first test, you can use this code directly.

CSS

Once you've embedded the iframe on your website, you can customize its design. For this, you can use the file quote.css as a template and customize it for yourself. Then, bind your custom CSS using the style parameter. The DIV element of the quote class wraps around the entire quote, so you can, for instance, set a border. Inside, there are two DIV elements with classes quotation for the quote itself and source for the author and the source.

Parameters

You can customize the selection of quotes using different parameters. Unique numbers, the IDs, are always used. For example, a random quote in English (language=en) in category Politics (categoryId=147):
https://api.zitat-service.de/v1/quote_html?categoryId=147&language=en

You can combine parameters for the author (authorId), the category (categoryId), the user (userId), and the language (language).

The target parameter is crucial for integrating into a webpage, for example, using an iframe. For security reasons, opening a new webpage within the original page is not allowed. The target parameter now allows for the links to be opened in a new tab or window.

Practical Examples

As inspiration, here are some websites that have integrated the Quote Service (as of 3 February 2024):