I want to use CCK from other module (my_module). Is there a CCK API? When the module is installed I want to create automatically, in my_module.install, the following:
- a new content type
- new fields for this new content type
- other CCK specific configurations for these
Where can I find references about CCK API (is exists).
Thanks!
Comments
Comment #1
yched commentedsee http://drupal.org/node/118863 - there are some open questions about that, still unsolved...
Comment #2
claudiu.cristeaNot sure that this is what I'm looking for... I'm searching for a API. I want to create a content type & fields through CCK but directly from PHP (module.install).
Comment #3
yched commentedyes, that's exactly what the referenced thread is about
Comment #4
claudiu.cristeaMaybe... But it make no sense to me. I need something that can be referenced like:
Comment #5
claudiu.cristeaSupposing that I'm applying that patch, what function do I need to call? How?
Comment #6
yched commentedPlease follow up using the referenced thread.
As you can read over there : there is no such functionality at the moment. There are still unresolved issues or questions. So the short answer is : 'well, you can't'.
If you do think additional time and efforts should be put in this, feel free to join the discussion / provide feedback / contribute some code - *using the right thread*. This is open source. Issues get fixed and features get added only if there are people with the will, the ability _and_ the time.
Comment #7
csbened commentedHere you find the answer, using CCK import
http://groups.drupal.org/node/5272#comment-54181