I spend much of my day working on Drupal websites. I use the barebones text editor, Textmate 2, so I don’t have any in-app Drupal documentation at my disposal. And while I’m beginning to have some parts of the API memorized, I still find myself needing to look up API functions in Drupal’s online API documentation. For a long time, I would search Google for Drupal and the API function. Then I learned this cool trick. Drupal’s API documentation follows a simple URL pattern, which makes creating a custom Chrome search engine possible. Here’s how it’s done.
- Open Chrome’s settings.
- Under search, click Manage search engines…
- You’ll see a list of default and other search engines. Scroll to the bottom of the other search engines.
- In the area to enter a new search engine, add a new one called Drupal API, keyword “druapi”, and URL “http://api.drupal.org/api/search/7/%s”
Now when you place your cursor in the URL bar, type “druapi”, and press tab, you can enter are API function to go directly to its documentation. Chrome is nice enough to keep a history of functions you’ve looked up as well. This works for Drupal module search (http://drupal.org/project/modules?solrsort=sis_project_release_usage%20desc&text=%s) and module pages (http://drupal.org/project/%s) as well.
Need a fresh perspective on a tough project?
Let’s talk about how RDG can help.