Empower developers with tools that assist with developing and debugging the frontend or backend of the site.

Linkback

This module provides multiple Linkback implementations for Drupal 8.

Jettison

Jettison unwanted CSS and JavaScript files!

This module provides a hook-based mechanism for getting rid of unwanted CSS and JS files. Simply declare which files you want deleted, and this will take care of removing them.

There's also a nice administration interface that can be used for simple cases.

What is it good for?

Sometimes a module adds CSS or JS that you don't want (or don't want to show up on non-admin themes). Use Jettison to get rid of them.

Occasionally, modules put their CSS/JS on every page when it should really only be on a few isolated pages. A jettison hook can be used to detect the conditions and then remove strategically.

Examples

Say we have a module called Example, and we want to remove the foo.js that some other module adds. Here's how to accomplish this in Jettison's API:

function example_preprocess_page(&$vars) {
  $icky_js = drupal_get_path('module', 'foo') . '/foo.js';
  jettison_js($icky_js, 'module');
}

Or to remove a CSS file from some offending theme (yes, this would be an edge case), we can do this:

function example_preprocess_page(&$vars) {
  $ugly_css = drupal_get_path('theme', 'ugly') . '/foo.css';
  jettison_css($ugly_css, 'theme');
}

If your needs are more sophisticated than a simple removal, you might want to look into the following API functions:

Field formatter settings

The Field API in Drupal core lacks the ability for other modules to easily alter field formatter settings forms and the formatter summaries.

UUID Resolver

UUID Resolver is a module that accepts a UUID under a registered wildcard menu path and redirects to the target object (i.e. node/term/etc.) the UUID identifies. It integrates with the UUID module to look up an object. When a page access hits the wildcard path with a UUID recognized in the system, the URL is redirected to the path of the target object.

For example, in a Drupal site http://www.example.com, node UUID lookup is registered on the path uuid/%. The site has a node:

  • nid: 2
  • uuid: 286acd2e-cd1d-11df-a386-005056812593

The following URL:

http://www.example.com/uuid/286acd2e-cd1d-11df-a386-005056812593

will be redirected to

http://www.example.com/node/2

Variable Cleanup

Your variable table can get bloated under three circumstances:

Cron key change

Makes possible to generate a new cron key.

Drush support: drush cronkeychange

Pages

Subscribe with RSS Subscribe to RSS - Developer tools