Closed (fixed)
Project:
Install Profile API (obsolete)
Version:
6.x-2.x-dev
Component:
CRUD functions and includes
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2008 at 05:45 UTC
Updated:
24 Sep 2009 at 17:34 UTC
Comments
Comment #1
boris mann commentedA little birdie told me that some major overhauls are in the works. Keep your ears open for the beginning of March.
Comment #2
boris mann commentedLooks like dmitri has gotten bored by the current version of install profiles :P
It looks like Sacha Chua has figured this out, we need to add it to crud.inc before enabling in Profile Wizard. See http://sachachua.com/wp/2008/06/12/programmatically-creating-cck-nodes-i... for discussion.
Comment #3
alex_b commentedThis is a function I built after reading Sacha's blog post and the one on Civic Actions she refers to. It takes an array as exported by content_copy and creates a new content type from it.
Using it on the second installation profile today. Works fine so far. Could use a if (module_exists('content_copy')) {} for better error handling. Does not support tacking on fields to existing content types - thought it wasn't necessary for building from scratch, I might be wrong though.
Will report back how it goes.
Comment #4
alex_b commentedAfter some more work we came across a good use case for adding fields to existing content types: adding fields to content types defined by modules such as blog module. Here is the updated function we're using:
I can roll this into a patch if interested.
Comment #5
boris mann commentedChanging this to newest branch. Should go into content.inc file in contrib folder. Please do roll a patch if it makes sense here.
The use case definitely makes sense for any module that creates node types.
Comment #6
mitchell commentedI referenced this issue here: #72509: Expose a "Save content type" action.
Comment #7
James Andres commentedI believe this is resolved with the
contrib/content_copy.inc. Re-open if I'm missing something.