How to embed the Pelagios Place Widget

1) Add the following javascript somewhere on your page.

<script type="text/javascript" src="http://pelagios.github.com/pelagios-widgets/lib/require.js"></script>
<script type="text/javascript" src="http://pelagios.github.com/pelagios-widgets/place.js"></script>

You only need to include the scripts once on each page even if you want to include multiple widgets.

2) Find the Pleiades ID of the place

Find the place on the Pleiades website and look at the URL of the page for the place to get the Pleiades ID of the place. e.g. if the URL is http://pleiades.stoa.org/places/579885/ or http://pleiades.stoa.org/places/579885/?searchterm=Athens* then the Pleiades ID is 579885.

3) Choose a widget ID

Your widget needs an ID which can be any alphanumeric string you like, but it must not clash with the id of any other html element on your page and if you want to embed more than one widget on a page each widget must have a different ID.

4) Add the following HTML to your page

Where you would like the widget to appear add the following HTML where PLEIADES_ID is your Pleiades ID and WIDGET_ID is your widget ID.

<div id="WIDGET_ID" data-pleiades_id="PLEIADES_ID" class="pelagios pelagios-place"></div>

or if you want it to appear inline:

<span id="WIDGET_ID" data-pleiades_id="PLEIADES_ID" class="pelagios pelagios-place"></span>

Options

Common problems