Shortcuts to api.drupal.org using Firefox keywords with string replacement

I found out about a handy new Firefox tip today while watching a Drupalize.me video, which I thought I would share.

As you may or may not know, you can assign a keyword to a bookmark. When you type in that keyword into the Firefox URL bar, you will be sent off to the full URL. So it saves a bit of typing.

The real time saving begins when you start doing string substitutions. You can add a sting after the keyword, and this will be added to the end of the URL. For example, I can type in dapi hook_block_save into the URL bar, and I will end up on api.drupal.org on the page for hook_block_save (D7). Lets go through how to set this up.

Shortcut to api.drupal.org hook function pages

Go to http://api.drupal.org/apis and add it as a bookmark.

Go to Show all bookmarks and find that bookmark. The URL will probably be http://api.drupal.org/api/search/7/apis as you would be been redirected, so remove api/search/7/ from the URL.

On the end of the URL, add %s, so it will become http://api.drupal.org/apis/%s. Under Keyword, add dapi. 

Firefox bookmark 

Now, in your URL bar, type dapi hook_block_save. This will append the url with hook_block_save and send you to http://api.drupal.org/apis/hook_block_save. http://api.drupal.org/apis is a special page which will redirect you to the hooks page of the latest Drupal version (in this case Drupal 7) if you add the hook name to the path. If that hook does not exist in the latest Drupal version, it will do a search for it instead.

 

Type dapi hook_block_save 

Firefox keyword search

 

You'll be sent to http://api.drupal.org/apis/hook_block_save, which redirects to http://api.drupal.org/api/drupal/modules--block--block.api.php/function/hook_block_save/7

api.drupal.org hook_block_save 

 

Hopefully that will save you a bit of time. Every little bit helps! 

Post new comment

The content of this field is kept private and will not be shown publicly.

Learn how to write custom Drupal modules

Does Drupal module development make your head explode and drive you crazy?

Why not learn from someone who has paved the way instead?

Sign up to Master Drupal 7 Module Development.

Hello!!

I am Blair Wadman and this is where I write about Drupal, PHP, CSS etc

Stuff

Syndicate

Syndicate content

© Blair Wadman
2005 - 2011