0

I need create chat module for contao 2.11. Website have standard and custom modules. I need add global javascript file (load on each front end url) and html block, with I can add to each page. Best if I'll do it in my own module, without interfering in other modules or core.

I was looking for in other modules but I not found. I'm not found too any global java script tutorial.

Other question: Can you recommend some book about Contao for developers. Because probably I'll probably have to often work with contao.

Thanks in advance for any answers.

I need this information as soon as possible, that after google research I sent this post. I'm sure that somewhere in internet exist answer. But 4 hours tutorial and modules study nod solved my issue.

Regards

110precent
  • 322
  • 4
  • 19

1 Answers1

1

Two ways you can add a javascript file:

  1. Create a custom template from fe_page and add your own <script> tag to it.
  2. Add your custom <script> tag to each page layout in your theme. It is the field Additional head tags, under Expert settings.
Simon Josef Kok
  • 745
  • 1
  • 8
  • 22