Sometimes, you may want to add universal codes or scripts to your websites. To do so, you must modify the skin of your website.
This article describes the process of adding a universal code on your website.
Access to the DNN server and Read and Write permissions to the file system or Admin Access
Open the Windows File Explorer.
Navigate to the folder where your DNN site is installed, and open your skin folder at
Open one of the folders for a specific skin. This will depend on which skins you have installed for your site.
Within the skin folder, open one of the .ascx files for your skin. The file you choose will depend on which pages you want to display the script on. For example, in the image below, the default skin, main.ascx, is located at
/Portals/_default/Skins/Cavalier/. For portals using the Cavalier skin, the main.ascx file is commonly loaded on the many pages.
Using a text editor, edit the .ascx file and append your code to the bottom of the page.
console.log("my personal code");
- Save the file.
Restart the application. For example: Navigate to Persona Bar > Servers and click Restart Application.
Browse to the site and hit on Ctrl + F5. (This clears the cache of the previous version of your page.)
Right-click on the page and select View Page Source.
The added code is present when viewed in View Page Source.
- The script executes as intended. (This requires that your included script is functional.)