Cantook Hub offers a JavaScript integration that displays a link to the online reader, thus allowing online reading of publication excerpts on your website.

Once embedded on website pages featuring publications, the JavaScript code snippet displays a link for each publication for which an excerpt is available, allowing the excerpt to be opened directly in the online reader.

The JavaScript code presented below assumes that the publication identifiers (ISBN, EAN or internal key) are available locally on the target website.

Embedding the JavaScript code snippet

Adding this feature requires the following additions to the markup of each of the targeted pages on your website.

  1. A code snippet that refers to the JavaScript file located on the Cantook Hub instance you need to connect to.
  2. The tags that display a link to the online reader at the desired location.

Referencing the JavaScript file

Simply fill in the code snippet below with the various parameters, copy it and paste it at the very end of each desired page.

Be sure to place this code just before the </body> tag and never paste it more than once per page, even if it contains more than one publication.

Code to embed

<script type="text/javascript"
  src="http://[domain]/api/bridge.js?v=2&mid=[mid]&l=[language]">
</script>
XML

Parameters

Parameter 

Required

Description

[domain]Yes

The domain name of the Cantook Hub instance you use to access your account. For example: www.entrepotnumerique.com, www.cantook.net, www.edenlivres.fr, edigita.cantook.netcantook.libranda.com.

[mid]

Yes

Your organization's number in the Cantook platform. This number corresponds to the number displayed on the Overview page of your organization profile.
[language]NoDisplay language. You can select either fr (for French) or en (for English). If the parameter is omitted, French is used by default.

Displaying a link to the online reader

In the markup of each target page, identify where you want a link to the online reader to be displayed, and paste the following tags there.

Code to embed

<div id="[platform_code]-wrap-[publication_id]" class="[platform_code]-wrap"><div class="flipbook-text">[content]</div></div>
XML

Parameters

Parameter 

Required

Description

[platform_code]Yes4-letter code for the Cantook Hub instance you are using. For example: enqc, cant, eden, edgt, libr.
[publication_id]

Yes

Identifier (ISBN, EAN or internal key) of the publication for which you want to query Cantook Hub.
[content]Yes

Custom HTML content that will be turned into a link to the online reader.

Here you can hardcode any content (text, image) and HTML/CSS formatting.

In the example above, the link to the online reader would be displayed over [content].