Submitted by rfay on
Thanks to excellent work by api module maintainer drumm, all of the examples in Examples module are now available on api.drupal.org.
If you're not familiar with Examples module, it's an attempt to provide easy-to-understand examples of key Drupal APIs, so that developers have a known source of a working example they can understand. Back in the day, there were a few examples in the Documentation branch of contrib in CVS, but they were poorly maintained and nobody knew how to improve them. All of those have been moved to Examples (for D6 and D7) and updated.
So with Examples now on api.drupal.org, you have more than one way to access the various examples:
- Download the module and look at the code.
- Install the module and experiment with the code.
- Just look for the example code in api.drupal.org with a simple search. For example, go to api.drupal.org/api/7 and search for "AJAX Examples". Or just search for example.
- Try out the D7 examples live on http://d7.drupalexamples.info
Currently on Drupal 7 we have these examples: AJAX, Batch, Block, DBTNG, E-mail, Field, , Form, Image, Javascript, Node, Page, Simpletest, Token, Trigger, Vertical Tabs, and XML-RPC.
Community contribution is encouraged. If you find errors, can suggest improvements, provide patches, provide new examples, please do it in the Examples issue queue. This is a big and important project and it will take the whole community to get it right. Thanks!