AdminCustomFiles by martijn-geerts

Add custom scripts & styles to the admin with optional dependencies

AdminCustomFiles

Admin Custom Files is a simple module that can add custom javascript plug-ins, scripts and styles to the Processwire admin area.

AdminCustomFiles is for ProcessWire 3 and up, if you are looking for the non name spaced AdminCustomFiles, you can still download it at GitHub.

Loading custom scripts & styles.


On install we try to create the AdminCustomFiles folder (/site/templates/AdminCustomFiles/). When This folder doesn't exist, please create it manually, then Module config will confirm the existence of AdminCustomFiles directory.

Default scripts and styles
We will inject .css and/or .js in the admin when the filename starts with the running process name and the file is in the AdminCustomFiles directory. Next you need to activate it for the process.

Theme based scripts and styles
Put files in the AdminCustomFiles directory that start with the currently active AdminTheme name and those files should get loaded.

Dependencies
Dependencies will load before the other injected files. See the module configuration for more details.

Cache busting


Adds a file hash get variable to all custom files to force a fresh copy from the server.

Config JS


Additional ProcessWire information in the console. See: console.log(config.AdminCustomFiles).

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #549
    In the 549th issue of ProcessWire Weekly we’re going to check out the latest core updates, highlight one older yet still very relevant third party module, and more. Read on!
    Weekly.pw / 17 November 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH