Friday , December 20 2024

Removing type=’text/javascript’ and type=’text/css’ from Joomla for validator

At first, as a person from the 17th century, I tried stupidly to remove these types in the template code, but this process did not give a result and the validator continued to show warnings. The solution is simpler than it seems at first:

In the folder with the template, find JFactory::getDocument(); and below you need to call the setHtml5 method with the true parameter:

$doc = JFactory::getDocument();
$doc->setHtml5(true);

About admin

Hi there! My name is Iryna, I am a web developer from Ukraine. While working on freelance projects I often face different technical issues and in this blog I publish articles on how to solve them. I am also interested in digital drawing and in this blog you will find brief tutorials that helped me and hopefully can help you as well.

Check Also

How to display page title anywhere in Joomla template

This solution was tested on joomla 3, here is the code to use: <h1 itemprop="name"> …

Leave a Reply

Your email address will not be published. Required fields are marked *