21 Sep
2009
21 Sep
'09
12:51 p.m.
Hi, I wanted to add an imagefield to a content type, using the function content_field_instance_create(). I wrote this piece of code. $field['field_name'] = 'myfield'; $field['type_name'] = 'story'; $field['type'] = 'filefield'; $field['widget_type'] = 'imagefield_widget'; module_load_include('inc', 'content', 'includes/content.crud'); content_field_instance_create($field); This works perfectly fine with me, and an imagefield gets added to the content type. are there any pitfalls in this i should take care of? or is there any better way to do such a thing? Thanks, -- Regards, Nitin Kumar Gupta http://publicmind.in/blog/