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:
<p id="Universalis_Mass_G.text"></p>
<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):
To see this list, please turn Javascript ON.
The textual content of the <p>
or <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.
Our preferred place for this lump of Javascript is at the end of the <head>
tag: that is, just before </head>
. But you may have your own ideas, and they will probably be right too.
It is possible to have both today's readings and next Sunday's readings both on the same page, but you need to be a bit competent at Javascript to do it. We give a few comments in the sample page as a hint.
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.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) |