Getting field settings from CCK

Tags: 

Sometimes when you want to replicate cck field way of work you need to get the settings from the required field. The main function you need is _content_type_info(). It will return array with all of the content types info, so you can get the general field settings or field settings per content type. Just do: dsm(_content_type_info()) and examine output properly.

If you know what field in what node type you're looking for then you can just use:
content_fields('field_name', 'type');

Trackback URL for this post:

http://alexisyes.com/trackback/49

No comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.