Insertar Bloque


/ Published in: PHP
Save to your folder(s)

Actualizado D7


Copy this code and paste it in your HTML
  1. <?php
  2. // Drupal 7
  3. $block = block_load('views', 'productos-block_3');
  4. $output = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
  5. print $output;
  6.  
  7. //
  8.  
  9. $block = module_invoke('views', 'block_view', 'blog-block');
  10. print render($block);
  11.  
  12. ?>
  13.  
  14. <?php
  15. print '<div class="block_inter">';
  16. /*otro
  17. $block = module_invoke('block' ,'block', 'view', 2)
  18.   $block = module_invoke('views', 'block', 'view', 'explore_menu-block_1');
  19. */
  20. $block = module_invoke('simplenews' ,'block','view', 1);
  21. print '<h2>' . $block['subject'] . '</h2>';
  22. print $block['content'];
  23. print '</div>';
  24.  
  25. //OR
  26.  
  27. print views_embed_view('mapa', 'block_2',$node->field_promocion[0]['nid']);
  28. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.