Skip to content

Instantly share code, notes, and snippets.

@asanchez75
Created October 13, 2012 17:21
Show Gist options
  • Save asanchez75/3885436 to your computer and use it in GitHub Desktop.
Save asanchez75/3885436 to your computer and use it in GitHub Desktop.
Drupal renderable array
1.
$x = array(
'#type' => 'html_tag',
'#value' => 'hola',
'#tag' => 'div',
);
2.
dpm(drupal_render($x));
See all types
dpm(system_element_info());
for example item_list is not a TYPE but you can use it as THEME
$x = array(
'#theme' => 'item_list',
'#items' => array(1,3,6),
);
dpm(drupal_render($x));
3.
theme('html_tag', array('element' => array('#value' => $item['title'], '#tag' => 'div', '#attributes' => array('class' => 'cana_image_legend')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment