For whatever reason, Xara has never rendered the Page Filename in a Scroll website/Presentation.
It seems to have never even consider showing the total number of pages in such a document.
The Xara HTML Filter does define a pages array, xr_apl and a page count, xr_pgspapn, so let's use them:
- Create three Text objects with values ("#page", "#page-name", "#pages") and additionally with ClassNames(htmlclass="page", htmlclass="page-name", htmlclass="pages").
- Set these to Repeat on all pages - don't remove any after this.
- Add, the following to Website > HTML > HTML Code (body):
Code:
<script>
var pg = xr_apl; /*Xara array of Pages[number, name]*/
var pgno = document.getElementsByClassName('page');
var pgnm = document.getElementsByClassName('page-name');
var pgall = document.getElementsByClassName('pages');
for (i=0; i , xr_pgspapn; i++) {
pgno[i].innerText = pg[i].number; /*Page Number*/
pgnm[i].innerText = pg[i].name; /*Page Filename*/
pgall[i].innerText = xr_pgspapn; /*Page Count*/
}
</script>
- Be sure to include a Page Filename or the page-name returned will just be Page nn, where nn is the Page Number.
- Alternatively, you can create a single Text Area of value "#description" and in its Body place, <span class="page-name"></span>: <span class="page"></span> of <span class="pages"></span>, noting you cannot mix and match the two display methods.
- Page Filename is forced by Xara to be all lowercase. You can use MS Character Map or simply copy and paste to get uppercase lettering. It all seems to work.
Acorn
Bookmarks