1 node_example.module theme_example_node_color($variables)

A custom theme function.

By using this function to format our node-specific information, themes can override this presentation if they wish. This is a simplified theme function purely for illustrative purposes.

Related topics

File

modules/examples/node_example/node_example.module, line 234
Module file for Node Example module.

Code

function theme_example_node_color($variables) {
  $output = '<span style="background-color: #ccc; padding: 1em; margin-bottom: 1em; float: left; color: ' . $variables['color'] . '">' . $variables['color'] . '</span>';
  return $output;
}