function contemplate_cck_get_fields in Content Templates (Contemplate) 5
Same name and namespace in other branches
- 6 contemplate.module \contemplate_cck_get_fields()
1 call to contemplate_cck_get_fields()
- contemplate_edit_type_form in ./
contemplate.module - Menu callback Edit the template for a specific node-type
File
- ./
contemplate.module, line 785 - Create templates to customize teaser and body content.
Code
function contemplate_cck_get_fields($type_name) {
if (module_exists('content')) {
$return = array();
$type = content_types($type_name);
if ($type) {
// if this is a CCK field
foreach ($type['fields'] as $field_name => $field) {
$return[] = theme('contemplate_field', $field);
}
$return = implode("\n", $return);
}
else {
$return = FALSE;
}
}
else {
$return = FALSE;
}
return $return;
}