By cburschka on
I am currently making a node type that will require the creation of several other nodes whenever a page of this type is added. Is there a function that creates a new node automatically?
I couldn't find one in the API, but it seemed like such an obvious feature that I thought I must have missed it...
Comments
node_save
Build a node object then call node_save.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.
Gah, I looked all over the
Gah, I looked all over the place for "make", "create", "add", but never thought of searching for "save"...
Thanks very much!
--
Arancaytar
2006'er, clarify for 2012'er
Can you clarify? Are you saying that I should write my own module and invoke node_save? What if I am not writing my own custom module? Anyway to do this the Drupal way? I am using Drupal 7
Rules
You can do this with Rules
What's new and changing in PHP 8.4