Search code examples
octobercms

How to add a Javascript code in my page October CMS


I need to integrate a code given by a supplier into my page and this code is in the form The code here .

I tried to put it in the text editor in code format, but every time I save it disappears.

Do you know how I can do this? This code displays messages and should only be on this page.

Thank you very much for your help.


Solution

  • In OctoberCMS you can add javascript code directly to the page's markup section.

    Please check the below screenshot and add code as shown below

    tutorialmeta.com October cms javascript ref: Add Javascript To October Cms Page

    for the more advanced use cases, you can use scripts placeholder ref: https://docs.octobercms.com/2.x/markup/tag-scripts.html

    if any doubt please comment.