Wednesday, October 5, 2011

hook_help() function on Drupal: 'helping menu' for Our Module

We've learnt how to create a new module on Drupal before, here is How to create a new module! We'll been added new features on it after this article.

As first, we should explain what our module is. For that reason, can put a helping menu. We'd said there were so much functions on Drupal library, hook_help() is just one of'em. If we want to realize what this article says, must implements hook_help() function.


* Implements hook_help().
function honda_help($path, $arg) {
 if($path == 'admin/help#honda') { //The direction
  return t('<a href=honda/hrv>CLICK FAQ</a> for HONDA HR-V.'); //We help here!
When checked t() function out, can see that able to use HTML tags, here is <a href=honda/hrv>CLICK FAQ</a>.

Click the "help?"!

We'll see you next article!