function theme_nd_field in Node displays 6
Theme function to render the field content.
Parameters
string $content The content to render.:
string $field_key The name of the field key.:
array $field The current field.:
2 theme calls to theme_nd_field()
- _nd_nodeapi in ./
nd.module - Helper function to alter node properties
- _nd_preprocess_node in ./
nd.module - Helper function used in either nd_preprocess_node or other preprocess function.
File
- theme/
theme.inc, line 15 - Theming functions for nd.
Code
function theme_nd_field($content, $field_key, $field) {
$output = '';
if (!empty($content)) {
if ($field['type'] == 'nd') {
$output .= '<div class="field field-' . $field_key . '">';
// Above label.
if ($field['labelformat'] == 'above') {
$output .= '<div class="field-label">' . $field['title'] . ': </div>';
}
// Inline label
if ($field['labelformat'] == 'inline') {
$output .= '<div class="field-label-inline-first">' . $field['title'] . ': </div>';
}
$output .= $content;
$output .= '</div>';
}
else {
$output = $content;
}
}
return $output;
}