diff --git a/sites/all/modules/ds/ds.module b/sites/all/modules/ds/ds.module
index 3505dfb..c772854 100644
--- a/sites/all/modules/ds/ds.module
+++ b/sites/all/modules/ds/ds.module
@@ -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(&$object, $module) {
   $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) {
 
@@ -218,7 +218,7 @@ function ds_build_fields_and_regions(&$object, $module) {
         if (isset($field_settings[$key]['css-class']) && !empty($field_settings[$key]['css-class'])) {
           $class .= ' '. $field_settings[$key]['css-class'];
         }
-        if ($field['type'] == DS_FIELD_TYPE_GROUP) {
+        if ($field['type'] == DS_FIELD_TYPE_GROUP || $field['type']) {
           $class .= ' field-group';
         }
 
@@ -244,19 +244,20 @@ function ds_build_fields_and_regions(&$object, $module) {
           $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
         // done in that module and we can skip the rest of the loop.
         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;
@@ -298,6 +299,18 @@ function ds_build_fields_and_regions(&$object, $module) {
             $field['formatter'] = $format;
             $object->{$key_rendered} = theme($format, $field);
             break;
+            //** Support CCK-3.3_dev multigroup as a theme function;
+    /*      case DS_FIELD_TYPE_MULTIGROUP:
+          	$format = 'nd_cck_multigroup'; //(isset($field_settings[$key]['format'])) ? $field_settings[$key]['format'] : key($field['properties']['formatters']);
+            $field['formatter'] = $format;
+          	$object->{$key_rendered} = theme($format, $field, $ds_groups); 
+          	break;
+          case DS_FIELD_TYPE_GROUP:
+          	$format = (isset($field_settings[$key]['format'])) ? $field_settings[$key]['format'] : key($field['properties']['formatters']);
+            $field['formatter'] = $format;
+            $object->{$key_rendered} = theme($format, $field);
+            break;
+          */
         }
       }
     }
@@ -323,19 +336,18 @@ function ds_build_fields_and_regions(&$object, $module) {
  * @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
+	// 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);
 
   // 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');
-
+  $display_settings = variable_get($module .'_display_settings_'. $object->type, array());
+  
   $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) {
@@ -361,20 +373,32 @@ function ds_render_content($object, $module, $vars, $theme_function = 'ds_field'
       }
     }
   }
-
   // Any groups which have nested content?
   if (!empty($object->ds_groups)) {
     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]);
-          unset($object->ds_fields[$key]);
-        }
+        //Support for CCK-dev Multigroup
+      if($fields['multigroup']){
+          $group_content = ds_get_cck_multigroup_content($object, $group, $display_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'] : '';
+	        foreach($vars[$key] as $row){
+	         $field_content .=  content_format($key, $row) . "<br>";
+	        }
+	        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)) {
 
@@ -398,7 +422,7 @@ function ds_render_content($object, $module, $vars, $theme_function = 'ds_field'
       }
     }
   }
-
+  
   // Loop through all regions.
   $region_classes = array();
   foreach ($all_regions as $region_name => $region_title) {
@@ -469,7 +493,6 @@ function ds_render_content($object, $module, $vars, $theme_function = 'ds_field'
     }
     $object_display->themed_regions['middle']['extra_class'] .= ' '.$middle_class;
   }
-
   // Theme the regions with their content.
   return theme('ds_regions', $object_display, $module);
 }
@@ -729,3 +752,46 @@ function ds_import_default_data($module = '', $type = '', $build_mode = '') {
     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, $display_settings){
+	$output = '';
+	$groups = array();
+	$group = array();
+	$instance = 0;
+	//remove 'multgroup' 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, $display_settings[$field]);
+  	}
+  	$instance= count($temp);
+  	$group[$field]= $temp;
+  }
+  //dpm($node);
+  //Out put something  
+  if($instance != 0){
+	  for($i = 0; $i < $instance; $i++){
+	    $output .= "<div class='fieldset'>";
+	    foreach($groups as $weight => $field){
+	    	//set the type of the field to 'ds' inorder to render throught 'ds_field' theme.
+	    	$node->ds_fields[$field]['type'] = 'ds';
+	  		$output .= theme('ds_field', $group[$field][$i] , $node->ds_fields[$field]); //. "<br>";
+	    }
+	  	$output .="</div>";
+	  }
+  }
+	return $output;
+}
\ No newline at end of file
diff --git a/sites/all/modules/ds/theme/theme_ui.inc b/sites/all/modules/ds/theme/theme_ui.inc
index 7f488e5..3b47a27 100644
--- a/sites/all/modules/ds/theme/theme_ui.inc
+++ b/sites/all/modules/ds/theme/theme_ui.inc
@@ -119,7 +119,7 @@ function template_preprocess_ds_display_overview_form(&$vars) {
     }
 
     $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_overview_views_form(&$vars) {
     }
 
     $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';
     }
diff --git a/sites/all/modules/nd/nd.module b/sites/all/modules/nd/nd.module
index 6190bd6..4da0600 100644
--- a/sites/all/modules/nd/nd.module
+++ b/sites/all/modules/nd/nd.module
@@ -226,7 +226,6 @@ function _nd_preprocess_node(&$vars, $hook) {
   $vars['template_files'][] = 'nd-'. $node->type;
   $vars['template_files'][] = 'nd-'. $node->type .'-'. $node->build_mode;
   $vars['template_files'][] = 'nd-'. $node->type .'-'. $node->build_mode .'-'. $node->nid;
-
   $content = ds_render_content($node, 'nd', $vars);
   $vars['content'] = $content;
 }
diff --git a/sites/all/modules/nd_contrib/nd_cck/nd_cck.module b/sites/all/modules/nd_contrib/nd_cck/nd_cck.module
index 4051edc..8763439 100644
--- a/sites/all/modules/nd_contrib/nd_cck/nd_cck.module
+++ b/sites/all/modules/nd_contrib/nd_cck/nd_cck.module
@@ -84,6 +84,7 @@ function nd_cck_ds_fields($type_name, $build_mode, $extra) {
     $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']];
@@ -103,20 +104,36 @@ function nd_cck_ds_fields($type_name, $build_mode, $extra) {
       $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';
@@ -253,7 +270,9 @@ function nd_cck_theme() {
       );
     }
   }
-
+  //Support Multigroup for CCK 3.3-dev
+  $theme_functions['nd_cck_multigroup'] =  array('arguments' => array ('element', 'group'), 'function' => 'theme_nd_cck_multigroup');  
+  
   return $theme_functions;
 }
 
@@ -299,4 +318,4 @@ function theme_nd_cck_node_formatter($element) {
     }
   }
   return $output;
-}
+}
\ No newline at end of file
diff --git a/sites/all/modules/nd_contrib/nd_cck/nd_cck.tpl.php b/sites/all/modules/nd_contrib/nd_cck/nd_cck.tpl.php
index c52384e..8dd00eb 100644
--- a/sites/all/modules/nd_contrib/nd_cck/nd_cck.tpl.php
+++ b/sites/all/modules/nd_contrib/nd_cck/nd_cck.tpl.php
@@ -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])): print $items[1]['view']; else : print $items[0]['view']; endif;?>
   <?php endif; ?>
 </div>
 <?php endif; ?>
\ No newline at end of file
