1 render_example.module render_example_add_prefix($markup, $element)

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

File

modules/examples/render_example/render_example.module, line 239
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;
}