We need to be able to click on a node to display more info on that node.

The system spits out a graphapi-node with a graphapi-title and optional graphapi-content. This is in place for graphapi-devel module spitting out content like

<div class="graphapi-node" id="graphapi-sys_mod_lay-29107dcce33a90f4f5b434d442c1a307" style="position: absolute; left: 632.7px; top: 487.633px;">
<div style="background-color: #00ff00;" class="graphapi-title">rdf</div>
<div title="rdf" class="graphapi-content">stdClass Object
(
    [uri] =&gt; modules/rdf/rdf.module
-- cut --
)
</div></div>

but we need integration with ie jQuery dialog.

Comments

clemens.tolboom’s picture

Title: Display node content when clicking on a node » Define graphapi display mode

When having a display mode for all our entities the site builders can define how to render these entities.

For this to work we need the URI for entities.

These URIs can then be used for overlay purposes.

clemens.tolboom’s picture

clemens.tolboom’s picture

Use something like


/**
 * Implementation of hook_entity_info_alter()
 *
 * provides a own display / view mode for field in nodes. Because we had in comment view
 * dialog a node preview on top.
 *
 * @param $entity_info
 */
function xxx_dialogs_entity_info_alter(&$entity_info) {
  $entity_info['node']['view modes']['xxx_dialogs'] = array(
    'label' => t('Dialog preview mode'),
    'custom settings' => TRUE,
  );
}

/**
 * Implements hook_preprocess_node().
 *
 * provides a own template file override suggestion for display:
 * you can use: node_TYPE_xxx_dialogs.tpl.php
 */
function xxx_dialogs_preprocess_node(&$vars) {
  if($vars['view_mode'] == 'xxx_dialogs') {
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['type'] . '__xxx_dialogs';
  }
}

(danke blackice2999)

clemens.tolboom’s picture

clemens.tolboom’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
clemens.tolboom’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Issue summary: View changes

Moved to Drupal 8