Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. function custom_giggity_block_info(){
  4. $block['custom_giggity'] = array(
  5. 'info' => t('Custom giggity'),
  6. 'cache' => DRUPAL_NO_CACHE,
  7. );
  8. return $block;
  9. }
  10.  
  11. function custom_giggity_block_view($delta = ''){
  12. $block = array();
  13. if($delta == 'custom_giggity'){
  14. $block['content'] = custom_giggity_contents($delta);
  15. }
  16. return $block;
  17. }
  18.  
  19. function custom_giggity_contents($delta){
  20. //Code that generates what goes into $block['content']
  21. return $output;
  22. }
  23.  
  24. function giggity_contents() {
  25. $items['giggity'] = array(
  26. 'title' => "Giggity",
  27. 'page callback' => "show_giggity", //or custom_giggity_contents ;)
  28. 'access arguments' => array('access content'),
  29. 'file' => 'giggity.inc',
  30. 'type' => MENU_CALLBACK
  31. );
  32. return $items;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement