How about a CRUD function for adding new nodes?

CommentFileSizeAuthor
#1 install_profile_api_n396826.patch1.72 KBdamienmckenna

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.72 KB

How's about something simple like this?

damienmckenna’s picture

It was suggested by quicksketch that node_export already has functionality to load nodes exported by it. However, the problem is that node_export's import routines are based upon loading node/add/[type] for the final submission, so it wouldn't work for the goal of being able to easily add nodes through the install profile.

So, with the above goal, would this work or is there a recommendation for another way of doing it? Thanks.

James Andres’s picture

Hi DamienMcKenna,

Check out the recently added contrib/export.inc helpers. The install_node_export_import_from_file() function does what you need, I believe.

You'll need to checkout the CVS Tag DRUPAL-6--2 to see the new code.

damienmckenna’s picture

Status: Needs review » Closed (duplicate)

Cool, that works.