Welcome to TalkGraphics.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,823

    Lightbulb Xara DTP - Page Information

    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
    Last edited by Acorn; 24 January 2022 at 08:36 AM.
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •