Shortcuts to using Firefox keywords with string replacement

I found out about a handy new Firefox tip today while watching a 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 on the page for hook_block_save (D7). Lets go through how to set this up.

Shortcut to hook function pages

Go to and add it as a bookmark.

Go to Show all bookmarks and find that bookmark. The URL will probably be 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 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 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, which redirects to hook_block_save 


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

If you liked this, you'll love my book, Master Drupal Module Development.

"..the must have drupal developers book"

Add new comment