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

A '#post_render' function to add a little markup onto the end markup.


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


modules/examples/render_example/render_example.module, line 239
Demonstrates render arrays.


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;