<?php
// $Id$
function gt_site_menu() {
$items['site/%'] = array(
'title' => 'test',
'page callback' => 'goPage',
'access callback' => true
);
return $items;
}
function goPage() {
$res = theme('home', array());
return $res;
}
function gt_site_theme() {
// 取得 gt_site 該 model 的 path
$path = drupal_get_path('module', 'gt_site');
$path .= '/themes';
return array(
'home' => array(
'template' => 'home',
'path' => $path)
);
}
/**
* Implements hook_help().
*/
function gt_site_help($path, $arg) {
$res = array();
foreach ($_GET as $key => $value) {
$res[] = sprintf('%s => %s', $key, $value);
}
$res[] = $path = drupal_get_path('module', 'gt_site');
$res = implode(' | ', $res);
return t($res);
}
沒有留言:
張貼留言