You are here

function theme_node_example_order_info in Examples for Developers 6

A custom theme function.

By using this function to format our node-specific information, themes can override this presentation if they wish. We also wrap the default presentation in a CSS class that is prefixed by the module name. This way, style sheets can modify the output without requiring theme code.

Related topics

1 theme call to theme_node_example_order_info()
node_example_view in node_example/node_example.module
Implementation of hook_view().

File

node_example/node_example.module, line 306
This is an example outlining how a module can be used to define a new node type.

Code

function theme_node_example_order_info($node) {
  $output = '<div class="node_example_order_info">';
  $output .= t('The order is for %quantity %color items.', array(
    '%quantity' => check_plain($node->quantity),
    '%color' => check_plain($node->color),
  ));
  $output .= '</div>';
  return $output;
}