So, I'm trying to generate some markup using render arrays. I need to create some nested divs. I thought that I could do this by nesting the arrays, as such:
function make_array() {
$items = port_view_get_block();
$array['container']['#prefix'] = '<div id = "container">';
$array['container']['#suffix'] = '</div>';
$array['container']['#markup'] = 'This is inside the container div';
$array['container']['slider']['#prefix'] = '<div id = "slider">';
$array['container']['slider']['#suffix'] = '</div>';
$array['container']['slider']['#markup'] = 'This is inside the slider div';
return $array;
}
This doesn't seem to work. The inner array isn't rendered.
What is the proper way to get a nested structure using render arrays?