Skip to content

Instantly share code, notes, and snippets.

@davereid
Created August 5, 2011 22:08
Show Gist options
  • Save davereid/1128643 to your computer and use it in GitHub Desktop.
Save davereid/1128643 to your computer and use it in GitHub Desktop.
Drupal Hello World
name = Hello World
description = "The most basic exercise known to programmers, the good old Hello world."
core = 7.x
<?php
/**
* @file
* Hello world module.
*/
/**
* Implements hook_menu().
*/
function helloworld_menu() {
$items['hello-world'] = array(
'title' => 'Hi',
'page callback' => 'helloworld_say_hi',
'access callback' => TRUE,
);
return $items;
}
/**
* Page callback to say hi to the world.
*/
function helloworld_say_hi() {
return array('#markup' => 'Hello World');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment