Return to Snippet

Revision: 37580
at December 13, 2010 02:14 by JohnnyGamba

Initial Code
$type_name = 'contacto'; #Content Type name
  $type = content_types($type_name); #Get all the info of the type

  if ($type) {

    $return = array();

     foreach ($type['fields'] as $field_name => $field) {

          $return[] = $field['field_name'];

     $return = implode("\n", $return);    
  } else {
        $return = FALSE;    

Initial URL

Initial Description
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.

Initial Title
Get an array with the names fields of a determined type of content

Initial Tags

Initial Language