[GeoNetwork-users] including a JS in every page

Hello,

my IT department developed a JS that takes care of the cookies message. For
that we need to include a couple of JS in every web page.

Would would be the simplest way of doing it in geonetwork ?

thanks

--
Sebastian E. Ovide

Hi,

What is your setup ?
The easiest way would be to edit this file

And add your js dependency in there.

Regards

On Thu, Dec 19, 2019 at 3:44 PM Sebastian E. Ovide <
sebastian.ovide@anonymised.com> wrote:

Hello,

my IT department developed a JS that takes care of the cookies message. For
that we need to include a couple of JS in every web page.

Would would be the simplest way of doing it in geonetwork ?

thanks

--
Sebastian E. Ovide

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
geonetwork-users List Signup and Options
GeoNetwork OpenSource is maintained at
GeoNetwork - Geographic Metadata Catalog download | SourceForge.net

--
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

*Florent Gravin*
*Technical Leader - Architect*
+33 4 58 48 20 36

Hi Florent

thanks for that.

I'm using Docker and to add that script I've updated our Dockerfile
updating the file that you suggested. It works. ! Here is the code I'm using

FROM geonetwork

# OS cookies
ENV COOKIE_CODE '<script src="https://myaddress/file.min.js&quot;&gt;&lt;/script&gt;&#39;
RUN sed -i '/<head\>/a '"$COOKIE_CODE" ./geonetwork/xslt/base-layout.xsl

On Thu, 19 Dec 2019 at 14:49, Florent Gravin <florent.gravin@anonymised.com>
wrote:

Hi,

What is your setup ?
The easiest way would be to edit this file
https://github.com/geonetwork/core-geonetwork/blob/master/web/src/main/webapp/xslt/base-layout-cssjs-loader.xsl
And add your js dependency in there.

Regards

On Thu, Dec 19, 2019 at 3:44 PM Sebastian E. Ovide <
sebastian.ovide@anonymised.com> wrote:

Hello,

my IT department developed a JS that takes care of the cookies message.
For
that we need to include a couple of JS in every web page.

Would would be the simplest way of doing it in geonetwork ?

thanks

--
Sebastian E. Ovide

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

*Florent Gravin*
*Technical Leader - Architect*
+33 4 58 48 20 36

--
Sebastian E. Ovide

[image: https://www.linkedin.com/in/ovide\]
<https://www.linkedin.com/in/ovide&gt;