inLibro / inlibro-koha

Outils et extensions pour le SIGB Koha
1 stars 16 forks source link

Carrousel : Only one OpacMainUserBlock additional contents allowed #68

Closed fridobox closed 2 years ago

fridobox commented 2 years ago

With Koha >= 21.11, Carrousel uses additional contents OpacMainUserBlock. I had one existing. I tried to create a new one with Carrousel HTML comments but plugin added code to the first one.

alex6ripetti commented 2 years ago

I am not sure to understand the problem. By default, for the versions after 21.11, we look for the OpacMainUserBlock in all categories. If we find it, we change it, if not we create one in the category html_customizations. What is the behavior that you expect ?

fridobox commented 2 years ago

we look for the OpacMainUserBlock in all categories You mean libraries ?

fridobox commented 2 years ago

Oh I see the changes from #65 I'm going to check if it solves my issue

fridobox commented 2 years ago

Ich it does not.

Look at search for existing additional content : https://github.com/inLibro/inlibro-koha/blob/f7d92e0fcd895f2a6956645b37b4c2eec9797d52/plugins/Koha/Plugin/Carrousel.pm#L570

I bet find returns the first one in case of several results.

Check that please :

My which is to be able to create an additional content in position 1 of my custom texte and an addictionnal content in position 2 for generated Carrousel(s)

Best regards,

fridobox commented 2 years ago

Fixed by #71 and #72

Thanks a lot :+1: