Render array

Updated: 10/17/2017 by Computer Hope

A render array is a fundamental building block of the Drupal content management system. It is an associative array of data structures containing the content of a web page. The array contains the data itself, as well as hints about how it should be "rendered."

When a web page is served, the data is formatted for display, using the associated hints, according to a theme. This separation of what the data is, and how it is presented to the user, allows the content manager enormous flexibility in modifying the presentation of data in a uniformly global manner.

The following is an example of a simple Drupal render array:

<?php $page = array( '#show_messages' => TRUE, '#theme' => 'page', 
'#type' => 'page', 'content' => array( 'system_main' => array(...), 
'another_block' => array(...), '#sorted' => TRUE, ), 'sidebar_first'
 => array( ... ), 'footer' => array( ... ), ... ); ?> 

Array, CMA (content management system), Render, Web design terms