?
avatar brainforgeUK
brainforgeUK
1 Nov 2016

Steps to reproduce the issue

In templates/isis/js add file custom.js

Expected result

custom.js will be used if it exists.

Actual result

custom.js is ignore

System information (as much as possible)

Joomla 3.6, PHP 5, PHP 7

Additional comments

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

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar brainforgeUK brainforgeUK - open - 1 Nov 2016
avatar brianteeman
brianteeman - comment - 1 Nov 2016

Please test #12684

avatar brianteeman brianteeman - change - 1 Nov 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-11-01 12:08:03
Closed_By brianteeman
avatar brianteeman brianteeman - close - 1 Nov 2016
avatar adambako
adambako - comment - 18 Aug 2021

hi. i just create js/custom.js and the file is not loaded..
it was not solve?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12683.

avatar brianteeman
brianteeman - comment - 18 Aug 2021

it should be user.js

avatar adambako
adambako - comment - 18 Aug 2021

ok. i created isis/js/user.js and its also not loaded.. can you check if its work for you?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12683.

avatar brianteeman
brianteeman - comment - 18 Aug 2021

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));
avatar adambako
adambako - comment - 18 Aug 2021

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12683.

Add a Comment

Login with GitHub to post a comment