Get an array with the names fields of a determined type of content
This snippet saves in the $return array all the names of the fields that a content type has added with CCK, has to be installed the cck module.
Copy this code and paste it in your HTML
$type_name = 'contacto'; #Content Type name
$type = content_types($type_name); #Get all the info of the type
if ($type) {
foreach ($type['fields'] as $field_name => $field) {
$return[] = $field['field_name'];
}
} else {
$return = FALSE;
}
Report this snippet