| 5 node_example.module | theme_node_example_order_info($node) |
| 6 node_example.module | 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.
Related topics
1 theme call to theme_node_example_order_info()
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;
}
Login or register to post comments