I am using concrete5 8.0.1 version. I have created a Add-on. Now i want to add a script and a style tag globally with the help of my add-on means if i enable setting from my add-on then one script and one style tag will added on overall site. Currently i am using below code but it's working only for my controller. If i click on other menu script and style tag will not load.
$this->addHeaderItem('<style type="text/css"> .mytyle { display:none;}</style>');
$this->addHeaderItem('<script> alert("Here")</script>');
In the package controller you can add following lines:
After you installed the package with this controller, these assets will be loaded on every page load.
Src: concrete5 - 1 and concrete5 - 2