Hi Jason, I was doing some simple experimenting this morning with BibTemplate and was able to create a very basic Call number display on our test server. Here is what we did to set this up:
1) In the default skin folder, edit js/result_common.js and add the line: dojo.require('openils.BibTemplate'); to the top of that file. Then, add //instantiate bibtemplate var here = findOrgUnit(getLocation()); new openils.BibTemplate({ root: r, record : rec.doc_id(), org_unit : here.shortname() }).render(); to the resultDisplayRecord(rec, pos, is_mr) function of the same file. I stole this code directly from Conifer's Evergreen contribution repository at: http://svn.open-ils.org/trac/ILS-Contrib/browser/conifer/branches/rel_1_6_0/web/opac/skin/btresult/js/result_common.js -check out that file for specifics. 2) Add this line to the xml/result/result_table.xml file: <span type='opac/slot-data' query='datafield[tag=050]' id='rresult_cn'></span><br /> This simply pulls the 050 call number marc field into the page. I placed this just above the title link line: <a title="&result.table.keyword;" name='item_title' class='title_link'> The results can be seen at: http://libdog.mohawkcollege.ca/opac/en-CA/skin/default/xml/rresult.xml?t=%20Korea&tp=keyword&d=0&rt=keyword Now, I emphasize that this is a simplistic starting point for testing purposes just to get started. Sometimes I like to start with the simplest example and go from there. Conifer is working on a much more useful and sophisticated results page which will pull in copy level information. The possibilities of the BibTemplate being used in the results page are incredible. Thank you Dan Scott for your presentation at Evergreen and Thank you Kevin Beswick for your work on the results page! And thank you to all the developers for the BibTemplate tool! Regards, Robert ________________________________________ From: open-ils-dev-boun...@list.georgialibraries.org [open-ils-dev-boun...@list.georgialibraries.org] On Behalf Of Jason Boyer [jas...@myjclibrary.org] Sent: May 3, 2010 2:48 PM To: Evergreen Development Discussion List Subject: [OPEN-ILS-DEV] ***SPAM*** Re: ***SPAM*** Looking at BibTemplate I'm working on getting a VM setup at work so I can spend more time with it, when I was having trouble getting results with other tags I was using my home laptop with a version of trunk that's got some age on it. All I've tried to do there was add fields to the record display, nothing terribly fancy. That's working out ok, I just wanted to see if it was a local issue (looks that way) or if I was misunderstanding the scope of BibTemplate's abilities. Word of someone working on a results page with call numbers is what has me working on this in the first place. I got a lot out of your EG2010 conference presentation, and one of the complaints I've heard from staff ever since we migrated was that they wanted to see call numbers in search results instead of loading every record individually. I didn't know that there was a working example of a results page though, that will be a big help. Thanks for the pointers. Jason -- Jason Boyer, IT Specialist Jackson County Public Library 303 W Second St Seymour, IN 47274 jas...@myjclibrary.org<mailto:jas...@myjclibrary.org> On Sun, May 2, 2010 at 8:23 PM, Dan Scott <d...@coffeecode.net<mailto:d...@coffeecode.net>> wrote: On 2 May 2010 11:19, Jason Boyer <jas...@myjclibrary.org<mailto:jas...@myjclibrary.org>> wrote: > I'm looking a little at BibTemplate in 1.6 and have a couple quick > questions. > One, I've been having some trouble getting any tags but <td> to work with > the type and query attributes. I've seen examples using spans, but I > couldn't get them to do anything. On our 1.6.0.4 system, I just tried adding: <p type='opac/slot-data' query='datafield[tag=245]'></p> to the top of our rdetails/rdetail_summary.xml file, above the table that normally displays the elements. And... it showed the contents of the 245 field as you would expect. Maybe you want to share an example of what you were trying to do? > Second, is BibTemplate enabled on the search results page, or only record > details? If it's not on the results page, how difficult would it be to add, > and is that already planned for a later release? There's not much to do to enable BibTemplate; Dojo is already active on the search results page, so you just need to clone the dojo.addOnLoad() section of rdetails/rdetail_summary.xml that contains the dojo.require('openils.BibTemplate') call and adjust the request to reflect the bib ID of each record. My colleague Kevin Beswick has an initial draft of a results page that uses BibTemplate running at http://laurentian-test.concat.ca/opac/en-CA/skin/btresult/xml/rresult.xml?t=android&tp=title&l=105&d=1&rt=title - there's still some work he needs to do, but it's the direction we're heading. And in general, yes, I think BibTemplate on the default skin for search results and more use of it on the record details page are goals for a future release. -- Dan Scott Laurentian University This E-mail contains privileged and confidential information intended only for the individual or entity named in the message. If the reader of this message is not the intended recipient, or the agent responsible to deliver it to the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited. If this communication was received in error, please notify the sender by reply E-mail immediately, and delete and destroy the original message.