name = Luna Menu
description = Luna Menu Provide Demo For This One
core = 7.x
version = 1.2
package = Lunar
description = Luna Menu Provide Demo For This One
core = 7.x
version = 1.2
package = Lunar
This is the module file: luna.module
<?php
/**
* Implements hook_menu()
*/
function luna_menu(){
$items = array();
$items['lunar/main'] = array(
'title' => 'Luna Main',
'page callback' => 'hello',
'page arguments' => array('Good Morning'),
'access callback' => TRUE,
);
$items['lunar/main/satu'] = array(
'title' => 'Luna Satu',
'page callback' => 'ho',
'page arguments' => array('Good Evening'),
'access callback' => TRUE,
);
$items['lunar/indonesia'] = array(
'title' => 'Lunar Indonesia',
'page callback' => 'li',
'page arguments' => array('Holla For Indoensia'),
'access callback' => TRUE,
);
$items['lunar/indonesia/satu'] = array(
'title' => 'Lunar Satu Indonesia',
'page callback' => 'lo',
'page arguments' => array('Holli For Us All'),
'access callback' => TRUE,
);
return $items;
}
function hello($msg){
return $msg;
}
function ho($msg){
return $msg;
}
function li($msg){
$data = '';
for($i=0;$i<10;$i++){
$data .= $msg.' ';
}
return $data;
}
function lo($msg){
return $msg;
}
No comments:
Post a Comment