[Koha-devel] Adding "web pages" via Koha Plugins

David Cook dcook at prosentient.com.au
Mon Jan 23 00:15:45 CET 2023


Hi all,

 

What do folk think about adding "web pages" via Koha Plugins? 

 

At the moment, we can inject REST API routes and serve static files, but we
don't really have a way of creating web pages on the OPAC (or the Staff
Interface) that can be interacted with by a user without plugin permissions.


 

At the moment, there are a few options for providing this functionality. You
could create a custom page via opac-page.pl and inject Javascript using
"opac_js", but that involves some manual work from staff users.
Alternatively, you could serve a HTML page from a REST API endpoint, but
that's a corruption of the REST API. 

 

I suppose a Koha plugin could insert a page into the "additional_contents"
table, although there doesn't seem to be a robust machine friendly way of
detecting if the page was added by a plugin. Plus it could only be
referenced using an integer ID rather than a plugin namespace or shortcode.
Maybe the answer would be to add a column to the "additional_contents"
table? Something like "source"? (Although it would need to be more than
"plugin" so that different plugins aren't stepping on each other.)

 

But I think it would be useful to be able to add a Perl-backed page via a
Koha plugin in any case. 

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20230123/17fd21a3/attachment.htm>


More information about the Koha-devel mailing list