How to use ctools modal to popup some fields of a node on node view? I want when a user is viewing a node, some of the node fields will be shown as a popup (without any buttons). How can I do it?

Thank You!
I know that there is no codeWriting service here, but I can try to explain (with example) the process (not a universal way.. Will work only with the content the same type and same structure (suppose we have a content type with body, field_description and field_something)):


You need to customize (override) template of the content type:


example (node--MY_CONTENT_TYPE.tpl.php):

&lt;div id="node-&lt;?php print $node-&gt;nid; ?&gt;" class="&lt;?php print $classes; ?&gt; clearfix"&lt;?php print $attributes; ?&gt;&gt;
  &lt;div class="body-field"&gt;
    &lt;?php print render($content['body']); ?&gt;
  &lt;/div&gt;


  &lt;div class="description-field"&gt;
    &lt;?php print ctools_modal_text_button(t('Click to see DescriptionField'), 'show-as-a-popup/' . $node-&gt;nid .'/field_description/nojs', t('DescriptionField'), 'ctools-modal-custom-modal-style'); ?&gt;
  &lt;/div&gt;


  &lt;div class="something-field"&gt;
    &lt;?php print ctools_modal_text_button(t('Click to see SomethingField'), 'show-as-a-popup/' . $node-&gt;nid .'/field_something/nojs', t('SomethingField'), 'ctools-modal-custom-modal-style'); ?&gt;
  &lt;/div&gt;
&lt;/div&gt;



Create custom module
Create a function in my_module.module file which includes ctools' libraries and sends javascript settings:


example:

function _myModuleIncludesModal() {
  static $added = FALSE;
  if ($added == FALSE) {
    $added = TRUE;

    ctools_include('modal');
    ctools_include('ajax');
    ctools_modal_add_js();

    $customModalStyle = array(
      'custom-modal-style' =&gt; array(
        'modalSize' =&gt; array(
          'type' =&gt; 'fixed',
          'width' =&gt; 800,
          'height' =&gt; 'auto',
          'addWidth' =&gt; 20,
          'addHeight' =&gt; 20,
          'contentRight' =&gt; 20,
          'contentBottom' =&gt; 20,
        ),
        'modalOptions' =&gt; array(
          'opacity' =&gt; (float) 0.6,
          'background-color' =&gt; '#000000',
        ),
        'closeText' =&gt; 'Close',
        'loadingText' =&gt; 'Loading...',
        'animation' =&gt; 'fadeIn',
        'animationSpeed' =&gt; 'fast',
      ),
    );

    drupal_add_js($customModalStyle, 'setting');
  }
}



Implement hook_menu() hook:


example:

function my_module_menu() {
  $items = array();

  $items['show-as-a-popup/%node/%/%ctools_js'] = array(
    'title' =&gt; 'Node Field',
    'page callback' =&gt; 'nodeFieldPopupCallback',
    'page arguments' =&gt; array(1, 2, 3),
    'access callback' =&gt; 'user_access',
    'access arguments' =&gt; array('access content'),
    'type' =&gt; MENU_CALLBACK,
  );

  return $items;
}



Create a callback function:


example:

function nodeFieldCallback($node, $fieldType, $js = NULL) {
  if (!$js) {
    drupal_access_denied();
    drupal_exit();
  }

  ctools_include('modal');
  ctools_include('ajax');

  $nodeWrapper = entity_metadata_wrapper('node', $node);

  $output = $nodeWrapper-&gt;{$fieldType}-&gt;value();

  $return[] = ctools_modal_command_display(t('PoPUp'), $output);
  print ajax_render($return);
  drupal_exit();
}



Finally call our _myModuleIncludesModal() in "specific" node pages:


example (template.php):

function MY_THEME_preprocess_node(&amp;$variables) {
  if($variables['type'] == 'MY_CONTENT_TYPE') {
    _myModuleIncludesModal();
  }
}


Modal settings/options, templating and throbber templating can be found in ctools' help directory;
Don't forget to flush the cache;