New answers tagged

0

You could add a script (or CSS) to the doc head using the HTML Helper use Joomla\CMS\HTML\HTMLHelper; HTMLHelper::_('script', 'path/to/your/js/script.js', ['version' => 'auto', 'relative' => false] ); However, you cannot add PHP code to Joomla articles so you have to use another method for that. For instance a plugin that adds it to the code for ...


0

I found it similar ask. I solved it. Helpful answer nevermind I solved the problem


0

Use Joomla\CMS\Application\WebApplication::getDocument(). In your code you're already doing this with $app->getDocument().


1

I can solve it. JCH Optimize solved the problem almost. You can add Js what you want to remove if unused. you should do: Downloads plugin JCH Optimize. I use free version get in setting plugin 3.Basic Features ---> Remove Unused Javascript ---> add item save and clear chache I was wrong before. It works only if you have script on you server or ...


Top 50 recent answers are included