8.3.x common.inc show(&$element)
8.0.x common.inc show(&$element)
8.1.x common.inc show(&$element)
8.2.x common.inc show(&$element)
8.4.x common.inc show(&$element)
7.x common.inc show(&$element)

Shows a hidden element for later rendering.

You can also use render($element), which shows the element while rendering it.

The first time render() or drupal_render() is called on an element tree, as each element in the tree is rendered, it is marked with a #printed flag and the rendered children of the element are cached. Subsequent calls to render() or drupal_render() will not traverse the child tree of this element again: they will just use the cached children. So if you want to show an element, be sure to call show() on the element before its parent tree is rendered for the first time, as it will have no effect on subsequent renderings of the parent tree.


$element: The element to be shown.

Return value

The element.

See also



1 call to show()
render in includes/common.inc
Renders an element.
3 string references to 'show'
system_admin_config_page in modules/system/system.admin.inc
Menu callback; Provide the administration overview page.
theme_admin_block in modules/system/system.admin.inc
Returns HTML for an administrative block for display.
theme_system_admin_index in modules/system/system.admin.inc
Returns HTML for the output of the dashboard page.


includes/common.inc, line 6212
Common functions that many Drupal modules will need to reference.


function show(&$element) {
  $element['#printed'] = FALSE;
  return $element;