• Development

    Pull Quotes in Drupal 7 – Using hook_filter_info()

    I recently wrote a post called Pull Quotes Shortcodes via Custom Filters in Drupal 7 . This was a good solution, but I decided I wanted a little more flexibility in my filter (like being able to specify attributes in any order) and I wanted to get rid of the required [/pullquote] closing tag. Custom Filter has its limitations (and working through the gui would’ve been a PITA), so I fired up Vim and made a custom filter using hook_filter_info().

    Here is part of my original description of what I needed:

    I’ve been working on a Drupal 7 site that requires some nicely-formatted pull quotes. The site editors need the ability to add them to their content easily through the “filtered” text fields throughout the site (e.g., body).

  • Development

    Pull Quotes via Custom Filters in Drupal 7

    UPDATE: This was a good solution, but I decided I wanted a little more flexibility in my filter (like being able to specify attributes in any order) and I wanted to get rid of the required [/pullquote] closing tag. Custom Filter has its limitations (and working through the gui would’ve been a PITA), so I fired up Vim and made a custom filter using hook_filter_info(). I encourage you to look at this new post: Pull Quotes in Drupal 7 – Using hook_filter_info()

    I’ve been working on a Drupal 7 site that requires some nicely-formatted pull quotes. The site editors need the ability to add them to their content easily through the “filtered” text fields throughout the site (e.g., body). After trying a few shortcode-type modules I decided I’d get the most flexibility and power out of a simple custom filter. If you haven’t checked out Custom Filter, you’ll want to familiarize yourself with this module before proceeding.