function theme_theming_example_content_array
Theme a simple content array.
This theme function uses the newer recommended format where a single render array is provided to the theme function.
Related topics
File
-
theming_example/
theming_example.module, line 282
Code
function theme_theming_example_content_array($variables) {
$element = $variables['element'];
$output = '';
foreach (element_children($element) as $count) {
if (!$count) {
// The first paragraph is bolded.
$output .= '<p><strong>' . $element[$count]['#children'] . '</strong></p>';
}
else {
// Following paragraphs are just output as routine paragraphs.
$output .= '<p>' . $element[$count]['#children'] . '</p>';
}
}
return $output;
}