Monday, December 17, 2018

How to add custom javascript to Joomla! backend

by / Thursday, 19 March 2015 / Published in Joomla! articles & tutorials

Sometimes you need to add custom javascript to Joomla! backend. 

Modifying templates that are shipped with Joomla! core such as isis (or any other template) is not a good idea. Any upcoming update may overwrite your changes.

The best approach is to add a custom module to backend:

  1. Go to Extensions-Module Manager
  2. Select Administrator instead of Site on the left
  3. Add new Custom HTML module type
  4. Set Show Title to Hide, Position to Status or something similar
  5. Switch to HTML mode in your editor and add the code you need, like:

<script type="text/javascript">
   jQuery(document).ready(function($){
     $('.navbar a.brand, #status .viewsite a').attr('href','/index.php');
   });
</script>

Then save the module. Now your custom javascript snippet that you added to Joomla! backend will persist on all /administrator/ pages after login.

Read 1751 times Last modified on Thursday, 19 March 2015 18:42

Do you like this? Please share!

Simon Tushev

Simon is IT professional with interests in web design, electronics, photography and astronomy. He writes about PHP, Yii, Joomla!, Arduino and several other topics.

Welcome!

Here I publish articles related to my areas of interest, my brief notes that may save some time to others, as well as some of my works.

This site is a work in progress. I will add more sections in the future, such as

  • More photos to photogallery
  • More Joomla!-related articles
  • ...

 

themeforest

New Posts

Using dynamic GeoIP module with nginx (CentOS)

nginx introduced dynamic module support in v. 1.9.11. This brief article provides step-by-step procedure...

13-04-2016 in Linux, BSD, Unix

READ MORE

Visual difference between pseudo and true random data

This is is "random" image generated using PHP rand() function: And this is an image...

20-11-2015 in Blog

READ MORE

Best EEPROM practices

(this article is a work in progress). My own advice will be added later...   Having...

12-10-2015 in Arduino

READ MORE
Scroll to top

We use cookies, just to track visits to our website, we store no personal details Privacy policy