You are here

function ds_attach_display in Display Suite 6.3

Attach a display to a renderable item

Given either an object or array, attach a display object to it for later rendering.

1 call to ds_attach_display()
_nd_nodeapi in modules/nd/nd.module
Helper function to alter node properties

File

./ds.module, line 373

Code

function ds_attach_display(&$item) {
  module_load_include('inc', 'ds', 'includes/ds.api');
  if (is_object($item)) {
    $item->ds = ds_create_display();
    $item->ds
      ->initialise($item);
  }
  else {
    return FALSE;
  }
}