block

Fix for Fix for block theme

  1. /**
  2.  * Implements hook_theme().
  3.  */
  4. function mymodule_theme() {
  5.   return array(
  6.     'myblock' => array( // este es el nombre del theme_hook que se remplaza por theme_myblock
  7.       'argument' =>

Fix for block theme

  1. /**
  2.  * Implements hook_theme().
  3.  */
  4. function mymodule_theme() {
  5.   return array(
  6.     'myblock' => array(
  7.       'argument' => array('text' => NULL , 'origin' => NULL),
  8.     )
  9.   );
  10. }
  11.  
  12.  
  13. /**
  14.  *

block theme

  1. /**
  2.  * Implements hook_theme().
  3.  */
  4. function mymodule_theme() {
  5.   return array(
  6.     'myblock' => array(
  7.       'argument' => array('text' => NULL , 'origin' => NULL),
  8.     )
  9.   );
  10. }
  11.  
  12.  
  13. /**
  14.  *

Trying to display a custom view inside of a block

  1. <div id="tabbed-box">
  2.     <ul class="tabs">
  3.         <li><a href="#" class="current">Popular</a></li>
  4.         <li><a href="#" class="">Comments</a></li>
  5.         <li><a href="#" class="">Tags</a><

Fix for this custom module to show a block does not show a block :)

  1. <?php
  2. // $Id: my_module.module
  3.  
  4. /**
  5. * @file
  6. * Custom functions for this site.
  7. */
  8.  
  9. /**
  10. * Implementation of hook_block().
  11. * Adds a block that has new text.
  12. */
  13.  
  14. function new_block($op = 'lis

this custom module to show a block does not show a block :)

  1. <?php
  2. // $Id: my_module.module
  3.  
  4. /**
  5. * @file
  6. * Custom functions for this site.
  7. */
  8.  
  9. /**
  10. * Implementation of hook_block().
  11. * Adds a block that has new text.
  12. */
  13.  
  14. function new_block($op = 'lis

block node visibility

  1. <?php
  2. if (arg(0) == 'user' && arg(1) == $user->uid) {
  3.   return true;
  4. }
  5. ?>

Fix for Back Button Block

  1. <?php
  2. function back_button_block($op = 'list', $delta = '', $edit = array()) {
  3.   switch ($op) {
  4.     case 'list':
  5.       $blocks['back'] = array(
  6.         'info'       => t('A simple back-button'),

Back Button Block

  1. <?php
  2. function back_button_block($op = 'list', $delta = '', $edit = array()) {
  3.   switch ($op) {
  4.     case 'list':
  5.       $blocks['back'] = array(
  6.         'info'       => t('A simple back-button'),

Output of drupal_render

  1. <div class="form-item">
  2.  <label>Rol: </label>
  3.  <div class="form-radios"></div>
  4. </div>
  5. <div class="form-item">
  6.  <label>Projectfase: </label>
  7.  <div class="form-checkboxes"></div>
  8. </div>
  9. <div cla
Syndicate content