including a JS in every page

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

including a JS in every page

sebastian.ovide
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: including a JS in every page

Florent gravin-2
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 <
[hidden email]> 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
> [hidden email]
> 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

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: including a JS in every page

sebastian.ovide
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"></script>'
RUN sed -i '/<head\>/a '"$COOKIE_CODE" ./geonetwork/xslt/base-layout.xsl



On Thu, 19 Dec 2019 at 14:49, Florent Gravin <[hidden email]>
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 <
> [hidden email]> 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
>> [hidden email]
>> 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>

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