Best practice to re-assign the content of a cck imagefiled, while changing the content_type of a node

Events happening in the community are now at Drupal community events on www.drupal.org.
Erco-gdo's picture

In a project, I have 2 content_types (A & B), each one having a CCk imagefield defined (not shared).

I need trigger a rule that I will change the content type of a given node (from A to B).

During that operation,
I need to gather the data stored in the the CCK imagefield defined for Content_Type A (ok, this is done before content_type "upgrade").

Then, I'm wondering what is the best practice to store those data in the CCK imagefield defined for Content_Type B.

To keep in simple, I plan to have 2 imagefields setup with the same parameters, but the name.

Comments

There are ways to do what

kswan's picture

There are ways to do what you are describing in a custom module. You will need to look at the node_load() and node_save() functions.

It sounds like you are trying to manage a node state using the content type. If that is the case, a much better solution is to use a Taxonomy.

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: