https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26890
--- Comment #9 from David Cook <[email protected]> --- (In reply to Mark Hofstetter from comment #7) > + compared to a normal perl script which returns JSON (eg > opac-ratings-ajax.pl) > the API calls are extremly slow > Are you using CGI or PSGI/Plack for Koha? The REST API used by the plugins uses the Mojolicious framework; it should be fast for PSGI/Plack, but it would be extremely slow with CGI, as it would have to load and start code which expects to be in a persistent process. > + using sub opac_js plugin hook puts the js on every page ... > Yeah, it's a bit suboptimal, but you can be smart with your Javascript to minimize the functional impact of that. For instance, only run the Javascript you want to run if a very page-specific condition is met. There is probably a body tag or class for the page you want which should make this easy. > one major gotcha remains > > how do I access local script/template variables (like biblionumber) in the > plugin hook > You don't. The plugin hook doesn't take any arguments. It's just used for fetching data from plugins and then printing it out on the template. That's an interesting idea though... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
