In Drupal 7, i need to Programmatically
create the nodes, by using:
$node = new stdClass();
$node->type = "movie";
After, just this codes above, and lets assume i don't know what are the fields for it.
- How can i get to know the
fields
and that field'sstructure
for this Content Type? - (or) Can i echo out the
fields
inside a Content Type and itsrelations
?
Your opening a pretty serious api up with this. The base command is:
Fields are tied to entities. the argument's here are you asking for the fields attached to the "node" entity and the second argument is for the "node type" referred to in entity speak as the "bundle"
But it's a rather involved api. Check out the documentation for the entire api here: http://api.drupal.org/api/drupal/modules%21field%21field.module/group/field/7