1

When I "preview" a node add/edit form it shows a "trimmed version" and a "full version". I don't want to show the trimmed version.

The fix suggested for D6 doesn't work for D7. Any ideas?

4

You tried CSS?

.preview h3 , .preview .node.node-article.node-teaser {display: none}

In my case the content type is an article and worked.

  • looks like I will also hide this status message: The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication. You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split. – uwe Jan 7 '12 at 1:36
  • Thx for the help this worked for me! – user11762 Nov 30 '12 at 15:38
1

You can also override this page by using drupal 7's templating system.

Go to your modules/node/node.pages.inc file and find this function. It's line 422 for me.

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;
}

Then go to your template.php file of your theme and rename and modify the function to something like this:

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

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

  $preview_trimmed_version = FALSE;

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

  // Do we need to preview trimmed version of post as well as full version?
  $output .= '<p>You may make further edits below or click save when finished.</p><hr/>';

  $output .= $full;

  $output .= "</div>\n";

  return $output;

}
0

Simple answer

  1. go to admin/structure/types/manage/ on your site,
  2. Select manage display fields for your desire content type ,
  3. go to the teaser tab - set it to hidden at the format and save .

    next time when you edit the content just close the summary by click on the link (Hide summary)

  • 1
    I removed the "teaser" tab from display but I don't see a "hide summary" link when editing content. – uwe Jan 8 '12 at 19:07
0

Actually the CSS that worked for me was the following one.

.preview h3 , .preview article.node-teaser {display: none;}
  • Yeah, this is really going to depend on your site theme. This answer assumes an HTML5 theme. – mpdonadio Mar 9 '13 at 0:04
-1

You can use this also:

jQuery(document).ready(function($) {
  $("#console").hide();
  $(".preview h3").hide();
  $(".preview .node-teaser").hide();
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.