theme_node_example_order_info

  1. drupal
    1. 4.7
    2. 5
    3. 6 node_example.module
Versions
4.7 – 6 theme_node_example_order_info($node)

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.

Code

developer/examples/node_example.module, line 261

<?php
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;
}
?>