Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    How to create a dynamic URL with callback

    • Article Type: General
    • Product: Aleph
    • Product Version: 19.01

    Description:
    We would like to add links to another site's items in our OPAC "Full View" page using their bibliographic API. This would be very similar to the Google Books thumbnail functionality that currently exists in the OPAC in that we would have a request URL that passes a unique ID to the service (in this case OCLC number) and a JavaScript callback function to dynamically adds links to the page. Implementing the callback function is not a problem, but I'm not sure how to go about building the request URL because I do not know exactly how the Aleph OPAC server is proceeding HTTP get requests. For the Google Books thumbnails, what component that is adding the request URL to the full view page? (for example: <script src="http://books.google.com/books?jscmd=viewapi&bibkeys=ISBN:0929398467&callback=ProcessGBSBookInfo"></script>) Is this something that we have access to modify?

    Resolution:
    In the documented use of Google Books the URL is generated behind the scenes and is placed on the page by using the $0700 placeholder. The code is compiled so you don't have access to modify it, however you may not need access to it. You can place your own URL in the script src tags. One customer has documented their method at:
    http://www.exlibrisgroup.org/display/AlephCC/Google+Book+cover+and+link+on+OPAC+results. Although this example is on the brief view, it was based off of the documented example for the full view. The codes (e.g. $1000) are called placeholders and their definition depends upon the web page they are placed into. KB 16384-194 gives a method for deciphering the codes. Also keep in mind that $1000 in the header will have a different definition/value than $1000 in the body and that will also differ from the tail.


    • Article last edited: 10/8/2013