Wednesday, 18 June 2014

Follow on from Drupal 7 basic Module

this is the next step on from this blog [link:] Drupal 7 Can’t see my Module.

Lets print hello world on a page.  Add this to helloworld.module

// calling hook_menu()

function helloworld_menu() {


     $menu[‘hello/world'] = array(

          'title' => ‘Hello World Simple Page',

          'page callback' => ‘helloworld_worldview’,  // this is the function underneath

    'access callback' => TRUE,


          return $menu;


functionhelloworld_worldview() {

  return ‘Hello World !';



No comments: