Index: plugins/content_types/node_context/node_comments.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/plugins/content_types/node_context/node_comments.inc,v
retrieving revision 1.2.2.5
diff -u -5 -p -r1.2.2.5 node_comments.inc
--- plugins/content_types/node_context/node_comments.inc	23 Jul 2010 17:47:12 -0000	1.2.2.5
+++ plugins/content_types/node_context/node_comments.inc	11 Sep 2010 08:58:27 -0000
@@ -15,10 +15,11 @@ if (module_exists('comment')) {
     'category' => t('Node'),
     'defaults' => array(
       'mode' => variable_get('comment_default_mode', COMMENT_MODE_THREADED_EXPANDED),
       'order' => variable_get('comment_default_order', COMMENT_ORDER_NEWEST_FIRST),
       'comments_per_page' => variable_get('comment_default_per_page', '50'),
+      'anchor' => 0,
     ),
   );
 }
 
 function ctools_node_comments_content_type_render($subtype, $conf, $panel_args, $context) {
@@ -40,32 +41,39 @@ function ctools_node_comments_content_ty
   return $block;
 }
 
 function ctools_node_comments_content_type_edit_form(&$form, &$form_state) {
   $conf = $form_state['conf'];
+  $form['anchor'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('HTML anchor'),
+    '#description' => t('If checked, an HTML anchor is added to allow linking within the same page. For example, http://example.com/node/2345#comment will take you to the comment area of the page.'),
+    '#default_value' => $conf['anchor'],
+    '#weight' => 1,
+  );
   $form['mode'] = array(
     '#type' => 'select',
     '#title' => t('Mode'),
     '#default_value' => $conf['mode'],
     '#options' => _comment_get_modes(),
-    '#weight' => 1,
+    '#weight' => 2,
   );
   $form['order'] = array(
     '#type' => 'select',
     '#title' => t('Sort'),
     '#default_value' => $conf['order'],
     '#options' => _comment_get_orders(),
-    '#weight' => 2,
+    '#weight' => 3,
   );
   foreach (_comment_per_page() as $i) {
     $options[$i] = t('!a comments per page', array('!a' => $i));
   }
   $form['comments_per_page'] = array('#type' => 'select',
     '#title' => t('Pager'),
     '#default_value' => $conf['comments_per_page'],
     '#options' => $options,
-    '#weight' => 3,
+    '#weight' => 4,
   );
 }
 
 function ctools_node_comments_content_type_edit_form_submit(&$form, &$form_state) {
   // Copy everything from our defaults.
@@ -173,8 +181,11 @@ function ctools_comment_render($node, $c
   for ($i = 0; $i < $divs; $i++) {
     $output .= '</div>';
   }
   $output .= theme('pager', NULL, $comments_per_page, 0);
 
+  if ($conf['anchor']) {
+    $output = '<div id="comments">' . $output . '</div>';
+  }
   return $output;
 }
 
