function theme_node_preview


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 theme_node_preview($variables)
cle7 theme_node_preview($variables)
elmsmedia7 theme_node_preview($variables)
icor7 theme_node_preview($variables)
meedjum_blog7 theme_node_preview($variables)
mooc7 theme_node_preview($variables)

Returns HTML for a node preview for display during node creation and editing.


$variables: An associative array containing:

  • node: The node object which is being previewed.

See also


Related topics

1 theme call to theme_node_preview()
node_preview in modules/node/
Generates a node preview.
7 string references to the theme hook from theme_node_preview()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

diff_node_form_build_preview_changes in sites/all/modules/ulmus/diff/diff.module
Submit handler for the 'View changes' action.
node_form in modules/node/
Form constructor for the node add/edit form.
node_form_build_preview in modules/node/
Form submission handler for node_form().
node_theme in modules/node/node.module
Implements hook_theme().
node_type_form in modules/node/
Form constructor for the node type editing form.

... See full list


modules/node/, line 420
Page callbacks for adding, editing, deleting, and revisions management for content.


function theme_node_preview($variables) {
  $node = $variables['node'];

  $output = '<div class="preview">';

  $preview_trimmed_version = FALSE;

  $elements = node_view(clone $node, 'teaser');
  $trimmed = drupal_render($elements);
  $elements = node_view($node, 'full');
  $full = drupal_render($elements);

  // Do we need to preview trimmed version of post as well as full version?
  if ($trimmed != $full) {
    drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication.<span class="no-js"> You can insert the delimiter "&lt;!--break--&gt;" (without the quotes) to fine-tune where your post gets split.</span>'));
    $output .= '<h3>' . t('Preview trimmed version') . '</h3>';
    $output .= $trimmed;
    $output .= '<h3>' . t('Preview full version') . '</h3>';
    $output .= $full;
  else {
    $output .= $full;
  $output .= "</div>\n";

  return $output;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.