You are here

function fieldgroup_nodeapi in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 5 fieldgroup.module \fieldgroup_nodeapi()
  2. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_nodeapi()
  3. 6 modules/fieldgroup/fieldgroup.module \fieldgroup_nodeapi()

Implementation of hook_nodeapi().

File

modules/fieldgroup/fieldgroup.module, line 540
Create field groups for CCK fields.

Code

function fieldgroup_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  switch ($op) {
    case 'view':

      // Prevent against invalid 'nodes' built by broken 3rd party code.
      if (isset($node->type)) {

        // Build the node content element needed to render each fieldgroup.
        foreach (fieldgroup_groups($node->type) as $group) {
          fieldgroup_build_content($group, $node, $teaser, $page);
        }
      }
      break;
  }
}