https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26890 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- (In reply to Mark Hofstetter from comment #7)
modifying opac-details.tt directly I'm able to write
$.ajax({ url: '/api/v1/contrib/subordinateitems/biblionumber/[% biblio.biblionumber | uri %]',
but how to handle this in the opac_js
(In reply to Mark Hofstetter from comment #8)
this solution is "fragile", is there any defined place where to find/extract the biblionumber
var biblionumber = document. getElementsByClassName("unapi-id")[0]. getAttribute("title").split(':')[2];
I think that the unapi-id that you found it probably your best bet, but that's a good point about there not being a great source of biblionumber on the detail page. I think there's an argument to be made for adding a data- attribute containing the biblionumber to the body on the detail page, or creating some kind of Javascript object via a template that provides access to the biblionumber. Or we could build on the RDFa data that we already have in the HTML and add an identifier (https://schema.org/identifier). I know that doesn't help you right now, but that would be a change that would be easy to make, get pushed, and backport. I'll open a Bugzilla issue report for it. I'd be curious to hear what Owen Leonard thinks is the best idea... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.