Same name and namespace in other branches
- 4.7.x developer/examples/node_example.module \theme_node_example_order_info()
- 5.x developer/examples/node_example.module \theme_node_example_order_info()
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.
1 theme call to theme_node_example_order_info()
- node_example_view in developer/
examples/ node_example.module - Implementation of hook_view().
File
- developer/
examples/ node_example.module, line 233 - 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' => $node->quantity,
'%color' => $node->color,
));
$output .= '</div>';
return $output;
}