I have a page callback like this:
function example_page() {
$build = array();
$build['#attributes'] = array('class' => array('example-class'));
$build[] = array(
'#markup' => '<p>My text here</p>',
);
return $build;
}
As you can see, I have attempted to add classes to the div that wraps the output of the render array in the same fashion as the form API works. I have also tried setting $build['classes']
or $build['classes_array']
, but all of these tree syntaxes are ignored, and the content is simply wrapped in <div class="content">
, which is not very helpful.