Can CCK take care of my fields for a programmatically specific node type in drupal?

Does the CCK api allow you to create a node type from a custom module with a bunch of fields that use CCK to store their state? If possible, these fields will be locked to prevent users from changing them, but still allow the user to add additional fields to the node type?

thank

+1


source to share


2 answers


I think the answer to your first question is yes (for Drupal 6, at least which contains CCK elements integrated into Drupal Core). I believe the Amazon module does this, albeit with a single field.



I don't think the idea in your second request is achievable. This seems to require field-level permission control whereas Drupal only supports module-level permission management.

+1


source


You can add validation code in the GUI that limits the CCK fields that interfere with your content type. This would not prevent another module from getting there with an ax.



You can add checks that restore your preferred CCK settings when they detect some unwanted changes.

0


source







All Articles