Previous Topic: JavaScript CustomizationNext Topic: Modifying Context Menus


sitemods.js

A skeleton sitemods.js file is distributed with CA SDM. All distributed HTMPL files include this file at the end of their <head> section, making it the last JavaScript file loaded. Because it is the last file, any functions defined in it override functions with the same name included earlier. This lets you provide your own version of a distributed JavaScript function without directly modifying distributed code.

This approach is not effective for functions invoked at load time in the <head> section, such as those in menubar.js and ahdmenus.js.

However, you can customize most JavaScript functions by completing the following steps:

  1. Place a modified version of the function in sitemods.js.
  2. Store the updated copy of sitemods.js in CAisd/site/mods/www/wwwroot/scripts.

More information:

Modify Menu Bars