When the stage view server is running, you can access all the service items via the URL
http://localhost:4316/api/service/list
In your stage view folder, there is the JavaScript file stage.js. Right at the top you’ll find the lines
$.getJSON( "/api/service/list",
where the script reads out the list of service items. It loops through all the items and looks for the currently active item here:
if (data.results.items[idx]["selected"]) {
Right after that you have to insert new code. By default, the script writes the notes into a html element with the id notes:
$("#notes").html(data.results.items[idx]["notes"].replace(/\n/g, "<br />"));
What we want to do is also to write the title into a html element with the id title. So something like this should do it:
$("#title").html(data.results.items[idx]["title"]);
Maybe you want to do this only for bible verses. Then it should look like this:
if (data.results.items[idx]["plugin"] == "bibles") { $("#title").html(data.results.items[idx]["title"]);}else { $("#title").empty();}
Then, in the file stage.html, insert an element with the id title, and style it to your liking.
<div id="title" style="..."></div>
And, don’t forget to point the html file to the altered .js file.
From: <script type="text/javascript" src="/files/stage.js"></script>To: <script type="text/javascript" src="/stage/yourStageName/stage.js"></script>