Created
January 3, 2014 22:02
-
-
Save RoySegall/8247491 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_menu(). | |
*/ | |
function module_menu() { | |
$items = array(); | |
$items['foo'] = array( | |
'page title' => 'Foo', | |
'page callback' => 'foo', | |
'access arguments' => TRUE, | |
); | |
return $items; | |
} | |
/** | |
* Page callback; This is how you can add css/js in the page callback not matter | |
* what is returned. | |
*/ | |
function foo() { | |
drupal_add_css(drupal_get_path('module', 'module_name') . '/css/module_name.css'); | |
drupal_add_js(drupal_get_path('module', 'module_name') . '/js/module_name.js'); | |
return array( | |
'whatever' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment