What you do is this:
Create it just the way you would create any other page on your web site.
Here is an example of the sort of HTML you would use:
<div> tag instead of
<p> if that is the standard for your site, and you can set a class or any other attribute that you need.
The essential ingredient is the
id attribute of the tag. This identifies which piece of the Universalis data should go in this tag. Here is a list of the names provided by Universalis for next Sunday (weekdays may have fewer readings):
The textual content of the
<div> tag you provide does not matter. It will be replaced by the data obtained from Universalis.
Please copy and paste it from the sample JSON page. This is because that page will always contain the latest version.
<head> tag: that is, just before
</head>. But you may have your own ideas, and they will probably be right too.
What happens when the user views the web page is this:
<script> element whose code is loaded from the Universalis site.
universalisCallback function, passing a JSON object which contains the readings for the day.
universalisCallback function extracts the items it wants from the JSON object it has been given, and puts them into the appropriate parts of your web page.
|This web site © Copyright 1996-2016 Universalis Publishing Ltd (contact us)