Skip to main content
Bounty Ended with 50 reputation awarded by Beto Aveiga
added example code
Source Link
user20765
user20765

The format and other settings of the field in a DS display are exported as part of the field instance element containing an array of settings per DS display. So, except from the DS display you have to track all the Field instances (from the related Feature section) in your feature.

An example of an exported field instance of a text field field_location with format Plain text in the Full DS view mode in feature file my_module.field_instance.inc is:

// Exported field_instance: 'node-image-field_location'.
  $field_instances['node-image-field_location'] = array(
    'bundle' => 'image',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'inline',
        'module' => 'text',
        'settings' => array(),
        'type' => 'text_plain',
        'weight' => 42,
      ),
      'full' => array(
        'label' => 'above',
        'module' => 'text',
        'settings' => array(),
        'type' => 'text_plain', // This is the exported format
        'weight' => 0,
      ),
      'teaser' => array(
        'label' => 'above',
        'settings' => array(),
        'type' => 'hidden',
        'weight' => 0,
      ),
      'token' => array(
        'label' => 'above',
        'settings' => array(),
        'type' => 'hidden',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'node',
    'field_name' => 'field_location',
    'label' => 'Location',
    'required' => 0,
    'settings' => array(
      'entity_translation_sync' => FALSE,
      'text_processing' => 0,
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'text',
      'settings' => array(
        'size' => 60,
      ),
      'type' => 'text_textfield',
      'weight' => 21,
    ),
  );

The format and other settings of the field in a DS display are exported as part of the field instance element containing an array of settings per DS display. So, except from the DS display you have to track all the Field instances (from the related Feature section) in your feature.

The format and other settings of the field in a DS display are exported as part of the field instance element containing an array of settings per DS display. So, except from the DS display you have to track all the Field instances (from the related Feature section) in your feature.

An example of an exported field instance of a text field field_location with format Plain text in the Full DS view mode in feature file my_module.field_instance.inc is:

// Exported field_instance: 'node-image-field_location'.
  $field_instances['node-image-field_location'] = array(
    'bundle' => 'image',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'inline',
        'module' => 'text',
        'settings' => array(),
        'type' => 'text_plain',
        'weight' => 42,
      ),
      'full' => array(
        'label' => 'above',
        'module' => 'text',
        'settings' => array(),
        'type' => 'text_plain', // This is the exported format
        'weight' => 0,
      ),
      'teaser' => array(
        'label' => 'above',
        'settings' => array(),
        'type' => 'hidden',
        'weight' => 0,
      ),
      'token' => array(
        'label' => 'above',
        'settings' => array(),
        'type' => 'hidden',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'node',
    'field_name' => 'field_location',
    'label' => 'Location',
    'required' => 0,
    'settings' => array(
      'entity_translation_sync' => FALSE,
      'text_processing' => 0,
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'text',
      'settings' => array(
        'size' => 60,
      ),
      'type' => 'text_textfield',
      'weight' => 21,
    ),
  );
Source Link
user20765
user20765

The format and other settings of the field in a DS display are exported as part of the field instance element containing an array of settings per DS display. So, except from the DS display you have to track all the Field instances (from the related Feature section) in your feature.