[Koha] How to add code to Marc record and display it in opac?

Katrin Fischer katrin.fischer.83 at web.de
Sat Sep 26 22:04:40 NZST 2020


Hi Pavlo,

MARC as a format is not thought to carry executable code. Any code you
add will be escaped for display as Koha assumes that < > and other
characters are supposed to be displayed as they were entered. I'd
recommend taking a look at how some of the other similar features are
implemented in Koha where only the URL and Mime type or similar are
catalogued and the other parts of the code are handled on template level.

For example see the HTLM5* system preferences:
https://koha-community.org/manual/20.05/en/html/systempreferences.html?highlight=youtube#html5-media

Hope this helps,

Katrin

On 23.09.20 15:29, Pavlo Bobesiuk wrote:
> Hi everyone.
> Someone tried to add code of embed book to marc record and display it in
> the opac html5 media player?
> I have an idea to convert the first pages of books into flipbooks (
> www.anyflip.com) and put code in marc record to be able to read them in
> opac media player.
> For example I would like to add this code:
>
> <iframe style="width:550px;height:350px" src="
> http://online.anyflip.com/mepon/fath/"  seamless="seamless" scrolling="no"
> frameborder="0" allowtransparency="true" allowfullscreen="true" ></iframe>
>
> to marc record of some book in 856u field, but in opac i see only code, I
> don't see frame with flip book.
> help me please realize this idea
>
> Paolo


More information about the Koha mailing list