Index: nd_contrib/nd_cck/nd_cck.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nd_contrib/nd_cck/Attic/nd_cck.module,v
retrieving revision 1.1.2.11.2.38
diff -u -p -r1.1.2.11.2.38 nd_cck.module
--- nd_contrib/nd_cck/nd_cck.module	28 Oct 2010 20:35:45 -0000	1.1.2.11.2.38
+++ nd_contrib/nd_cck/nd_cck.module	28 Oct 2010 23:25:42 -0000
@@ -32,6 +32,7 @@ function nd_cck_ds_fields($type_name, $b
     $type = content_types($type_name);
     $field_types = _content_field_types();
     $fields = $type['fields'];
+
     foreach ($fields as $field => $value) {
       $options = array();
       $field_type = $field_types[$value['type']];
@@ -51,20 +52,36 @@ function nd_cck_ds_fields($type_name, $b
       $groups = fieldgroup_groups($type_name);
       if (!empty($groups)) {
         foreach ($groups as $key => $group) {
-          $fields[$key] = array(
-            'title' => $group['label'],
-            'type' => DS_FIELD_TYPE_GROUP,
-            'status' => DS_FIELD_STATUS_STATIC,
-            'properties' => array(
-              'formatters' => array(
-                'ds_field' => 'A simple div',
-                'ds_group_fieldset_open' => 'Fieldset open',
-                'ds_group_fieldset_collapsible' => 'Fieldset collapsible',
-                'ds_group_fieldset_collapsed' => 'Fieldset collapsed',
+        	if ($group['group_type'] == 'multigroup'){
+        		$fields[$key] = array(
+              'title' => $group['label'],
+              'type' => DS_FIELD_TYPE_MULTIGROUP,
+              'status' => DS_FIELD_STATUS_STATIC,
+              'properties' => array(
+                'formatters' => array(
+                  'ds_field' => 'A simple div',
+                  'ds_group_fieldset_open' => 'Fieldset open',
+                  'ds_group_fieldset_collapsible' => 'Fieldset collapsible',
+                  'ds_group_fieldset_collapsed' => 'Fieldset collapsed',
+                ),
               ),
-            ),
-          );
-
+            );
+        	}
+        	else {
+            $fields[$key] = array(
+              'title' => $group['label'],
+              'type' => DS_FIELD_TYPE_GROUP,
+              'status' => DS_FIELD_STATUS_STATIC,
+              'properties' => array(
+                'formatters' => array(
+                  'ds_field' => 'A simple div',
+                  'ds_group_fieldset_open' => 'Fieldset open',
+                  'ds_group_fieldset_collapsible' => 'Fieldset collapsible',
+                  'ds_group_fieldset_collapsed' => 'Fieldset collapsed',
+                ),
+              ),
+            );
+        	}
           // Tabs support.
           if (module_exists('tabs')) {
             $fields[$key]['properties']['formatters']['ds_tabs'] = 'Tabs';
@@ -248,4 +265,4 @@ function theme_nd_cck_node_formatter($el
     }
   }
   return $output;
-}
+}
\ No newline at end of file
Index: nd_contrib/nd_cck/nd_cck.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nd_contrib/nd_cck/Attic/nd_cck.tpl.php,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 nd_cck.tpl.php
--- nd_contrib/nd_cck/nd_cck.tpl.php	7 Jun 2010 10:43:12 -0000	1.1.2.3
+++ nd_contrib/nd_cck/nd_cck.tpl.php	28 Oct 2010 23:25:42 -0000
@@ -43,7 +43,7 @@
       endforeach;?>
     </div>
   <?php else : ?>
-    <?php if ($label_display == 'inline') : ?><div class="field-label-inline-first"><?php print t($label) ?>:&nbsp;</div><?php endif; ?><?php print $items[0]['view'];?>
+    <?php if ($label_display == 'inline') : ?><div class="field-label-inline-first"><?php print t($label) ?>:&nbsp;</div><?php endif; ?><?php if (!isset($items[0]) && isset($items[1]['view'])): print $items[1]['view']; else : print $items[0]['view']; endif;?>
   <?php endif; ?>
 </div>
 <?php endif; ?>
\ No newline at end of file
Index: ds/ds.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ds/ds.module,v
retrieving revision 1.1.2.74
diff -u -p -r1.1.2.74 ds.module
--- ds/ds.module	5 Jul 2010 19:44:32 -0000	1.1.2.74
+++ ds/ds.module	28 Oct 2010 23:25:44 -0000
@@ -22,6 +22,7 @@ define('DS_FIELD_TYPE_IGNORE', 4);
 define('DS_FIELD_TYPE_CODE', 5);
 define('DS_FIELD_TYPE_BLOCK', 6);
 define('DS_FIELD_TYPE_GROUP', 7);
+define('DS_FIELD_TYPE_MULTIGROUP', 8);
 
 /**
  * Constants for field statuses.
@@ -204,7 +205,6 @@ function ds_build_fields_and_regions(&$o
   $field_settings = ds_default_value($display_settings, $object->build_mode, 'fields');
   // Get the object type for field rendering and tokenization.
   $object_type = $api_info['object'];
-
   if (!empty($fields)) {
     foreach ($fields as $key => $field) {
 
@@ -244,6 +244,10 @@ function ds_build_fields_and_regions(&$o
           $format = (isset($field_settings[$parent]['format'])) ? $field_settings[$parent]['format'] : 'ds_group_fieldset';
           $ds_fields[$parent]['theme'] = $format;
           $ds_groups[$parent][$key] = $weight;
+          // Support Multigroup
+          if ($fields[$parent]['type'] == DS_FIELD_TYPE_MULTIGROUP) {
+            $ds_groups[$parent]['multigroup']= TRUE;
+          }
         }
 
         // If the field has the storage key, it means the theming is
@@ -251,12 +255,10 @@ function ds_build_fields_and_regions(&$o
         if (isset($field['storage'])) {
           continue;
         }
-
         // Change the title if this is configured and label is not hidden.
         if (isset($field_settings[$key]['label_value']) && $ds_fields[$key]['labelformat'] != DS_DEFAULT_LABEL_FORMAT) {
           $ds_fields[$key]['title'] = t(check_plain($field_settings[$key]['label_value']));
         }
-
         // Add extra properties.
         $field['key'] = $key;
         $field['module'] = $module;
@@ -323,7 +325,6 @@ function ds_build_fields_and_regions(&$o
  * @param string $theme_function The theming function for a field.
  */
 function ds_render_content($object, $module, $vars, $theme_function = 'ds_field') {
-
   // API info for this module and type. This doesn't cost a lot
   // since it will be cached already in ds_build_fields_and_regions().
   $api_info = ds_api_info($module, $object->type);
@@ -331,11 +332,11 @@ function ds_render_content($object, $mod
   // Display settings for this module and object.
   $display_settings = variable_get($module .'_display_settings_'. $object->type, array());
   $region_styles = ds_default_value($display_settings, $object->build_mode, 'region_styles');
+  $field_settings = ds_default_value($display_settings, $object->build_mode, 'fields');
 
   $all_regions = ds_regions('all', TRUE);
   $regions = $vars['regions'];
   $themed_regions = array();
-
   // Create key_rendered fields from DS_FIELD_TYPE_PREPROCESS and DS_FIELD_TYPE_IGNORE.
   if (!empty($object->preprocess_fields)) {
     foreach ($object->preprocess_fields as $key => $type) {
@@ -367,14 +368,23 @@ function ds_render_content($object, $mod
     foreach ($object->ds_groups as $group => $fields) {
       asort($fields);
       $group_content = '';
-      foreach ($fields as $key => $weight) {
-        $field_content = isset($vars[$key .'_rendered']) ? $vars[$key .'_rendered'] : '';
-        if (!empty($field_content)) {
-          $group_content .= theme($theme_function, $field_content, $object->ds_fields[$key]);
+
+      // Support for CCK-dev Multigroup
+      if (isset($fields['multigroup'])) {
+        $group_content = ds_get_cck_multigroup_content($object, $group, $field_settings);
+        foreach ($fields as $key => $weight) {
           unset($object->ds_fields[$key]);
         }
       }
-
+      else {
+        foreach ($fields as $key => $weight) {
+          $field_content = isset($vars[$key .'_rendered']) ? $vars[$key .'_rendered'] : '';
+          if (!empty($field_content)) {
+            $group_content .= theme($theme_function, $field_content, $object->ds_fields[$key]);
+            unset($object->ds_fields[$key]);
+          }
+        }
+      }
       // Store group_content as content key in group key of ds_fields.
       if (!empty($group_content)) {
 
@@ -469,7 +479,6 @@ function ds_render_content($object, $mod
     }
     $object_display->themed_regions['middle']['extra_class'] .= ' '.$middle_class;
   }
-
   // Theme the regions with their content.
   return theme('ds_regions', $object_display, $module);
 }
@@ -729,3 +738,49 @@ function ds_import_default_data($module 
     ds_import_data($data, FALSE, FALSE, $module, $type, $build_mode);
   }
 }
+
+/**
+ * Function to return the html of cck-group field.
+ *
+ * @param object $node contains a lot of information.
+ * @param string $group_name The name of the group.
+ */
+function ds_get_cck_multigroup_content($node, $group_name, $field_settings){
+  $output = '';
+  $groups = array();
+  $group = array();
+  $instance = 0;
+
+  // Remove 'multigroup' flag.
+  foreach($node->ds_groups[$group_name] as $field => $weight){
+    if ($field != 'multigroup'){
+      $groups[$weight] = $field;
+    }
+  }
+
+  // Sort fields
+  ksort($groups);
+  // Get html of each field.
+  foreach($groups as $weight => $field){
+    $temp = array();
+    foreach ($node->$field as $row){
+      $temp[] = content_format($field, $row, $field_settings[$field]['format']);
+    }
+    $instance = count($temp);
+    $group[$field]= $temp;
+  }
+
+  // Output data.
+  if ($instance != 0) {
+    for ($i = 0; $i < $instance; $i++){
+      $output .= "<div class='field-item'>";
+      foreach ($groups as $weight => $field){
+        // Set the type of the field to 'ds' in order to render through 'ds_field' theme.
+        $node->ds_fields[$field]['type'] = 'ds';
+        $output .= theme('ds_field', $group[$field][$i], $node->ds_fields[$field]);
+      }
+      $output .= "</div>";
+    }
+  }
+  return $output;
+}
\ No newline at end of file
Index: ds/theme/theme_ui.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ds/theme/Attic/theme_ui.inc,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 theme_ui.inc
--- ds/theme/theme_ui.inc	30 Jun 2010 10:28:00 -0000	1.1.2.12
+++ ds/theme/theme_ui.inc	28 Oct 2010 23:25:44 -0000
@@ -119,7 +119,7 @@ function template_preprocess_ds_display_
     }
 
     $row->label_class = 'label-field';
-    if ($element[$build_mode]['type']['#value'] == DS_FIELD_TYPE_GROUP) {
+    if ($element[$build_mode]['type']['#value'] == DS_FIELD_TYPE_GROUP || $element[$build_mode]['type']['#value'] == DS_FIELD_TYPE_MULTIGROUP ) {
       $row->label_class .= ' field-group';
       $row->class .= ' tabledrag-root';
     }
@@ -271,7 +271,7 @@ function template_preprocess_ds_display_
     }
 
     $row->label_class = 'label-field';
-    if ($element[$build_mode]['type']['#value'] == DS_FIELD_TYPE_GROUP) {
+    if ($element[$build_mode]['type']['#value'] == DS_FIELD_TYPE_GROUP || $element[$build_mode]['type']['#value'] == DS_FIELD_TYPE_MULTIGROUP) {
       $row->label_class .= ' field-group';
       $row->class .= ' tabledrag-root';
     }
