function render_example_add_prefix in Examples for Developers 7
A '#post_render' function to add a little markup onto the end markup.
Parameters
string $markup: The rendered element.
array $element: The element which was rendered (for reference)
Return value
string Markup altered as necessary. In this case we add a little postscript to it.
Related topics
1 string reference to 'render_example_add_prefix'
- render_example_arrays in render_example/
render_example.module - Provides a number of render arrays and show what they do.
File
- render_example/
render_example.module, line 245 - Demonstrates render arrays.
Code
function render_example_add_prefix($markup, $element) {
$markup = '<div style="color:blue">This markup was added after rendering by a #post_render</div>' . $markup;
return $markup;
}