In templates/isis/js add file custom.js
custom.js will be used if it exists.
custom.js is ignore
Joomla 3.6, PHP 5, PHP 7
In index.php need to add the following lines after template.js
if (file_exists(DIR . '/js/custom.js')) {
$doc->addScriptVersion($this->baseurl . '/templates/' . $this->template . '/js/custom.js');
}
Other templates should be checked. All of them should support custom.js
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-01 12:08:03 |
Closed_By | ⇒ | brianteeman |
hi. i just create js/custom.js and the file is not loaded..
it was not solve?
it should be user.js
ok. i created isis/js/user.js and its also not loaded.. can you check if its work for you?
Sorry I realise now that you meant isis and the answer I gave you was for protostar
try adding this code to the isis template
// Check for a custom js file
JHtml::_('script', 'user.js', array('version' => 'auto', 'relative' => true));
ok, thanks.. i can do that and its working..
for the admin templates are no updates released? i tried to use override function, but it not working for isis/html/index.php
i hope some update will not override this.
thx
Please test #12684