Tip

Benjamin Melançon's picture

Add link to Performance page for easy access to clearing cache

Book element

  • Tip
  • When something in Drupal does not seem right, the first step is to clear caches. The Clear cache button lives on the Performance page. In the absence of development-helping modules such as admin_menu or devel that can provide one-click access to clearing the cache, we can add the Performance page to our Shortcuts bar for easy-access to the cache-clearing button. This is a solution right in Drupal core slightly easier than memorizing the path admin/config/development/performance.

  • Benjamin Melançon's picture

    Search for hook implementations with grep

    Book element

  • Tip
  • grep "_form_alter" $(find . -name '*.module' -or -name '*.inc' -or -name '*.php')

    The dot represents the current directory. Find works recursively (searches nested directories) by default. "_form_alter" can be the _something from any hook_something (or, of course, any text).

    Usually a debugger is a better way to find all what a hook invocation actually calls.

    Shell line adapted from http://benbuckman.net/node/6277/s5

  • Benjamin Melançon's picture

    Expand allowed HTML tags

    Book element

  • Tip
  • The Allowed HTML tags made available to content authors by default in the Limit allowed HTML tags input filter used in the default Filtered HTML text format is a bit too limited. For example, if we want to let people add images, headlines, or superscript text, we need to add the tags that make these possible: img, h1 through h6, and sup.

    Here is an example of an expanded allowed tags list

  • Pages

    Subscribe to Tip