When using the Display node options (not cck location) in Location module and then setting put layout using Display Suite module there is no option to see the info that the user filled in inside the Locative box when actually creating the content. This stuff just disappears. CCK keeps causing problems so I haven't tried it yet.

Comments

Shadlington’s picture

This is almost certainly a DS issue.
Integration with modules that attach data to nodes without using fields used to be handled in the DS node contributions module (and location was one such module, I believe) but that module is still only D6.
I believe the maintainers are waiting for the various modules that were previously integrated to get stable D7 releases.

I am, however, basing this on memory alone and am too lazy/busy right now to double-check my info.
So I'll not move the issue just yet.

Road Runner’s picture

Update on my issue Location, Display Suite D7: When switching to using Location CCK and then enabling that field in a content type - Display Suite does show the location data in a custom layout so the problem seems to be just with the Node location as mentioned in initial post.

jonhattan’s picture

Issue summary: View changes

Don't have the time to provide a patch now, but anyone interested can use this code as a basis to integrate location node with display suite:

/**
 * Implements hook_ds_fields_info().
 */
function MODULE_ds_fields_info($entity_type) {
  $fields = array();
  $fields['node']['location'] = array(
    'title' => t('Location'),
    'field_type' => DS_FIELD_TYPE_FUNCTION,
    'function' => 'MODULE_ds_location',
  );
  return $fields;
}

function MODULE_ds_location($vars) {
  $node = $vars['entity'];
  $settings = variable_get('location_settings_node_' . $node->type, array());
  return render(location_display($settings, $node->locations));
}
phily’s picture

Thanks, that works (you'll need a custom module to do so).

kris77’s picture

Thanks @jonhattan,
i put your code in a custom module and its works.