Fairly new here. I've been trying to figure this out myself and everything I've tried has failed.
When a story is posted and the teaser is on the front page,I am looking to have the "add new comment/# of comments" on the bottom of the teaser. Currently it only has the "read more"

Any help would be greatly appreciated. Thank you.

Comments

komal.savla’s picture

Hi,
To add the "Add new comment" link on the teaser you can add the following code in the node--teaser.tpl.php to the end of the file below the "read more" link.

 <span class="teaser-readmore"><?php print l(t('read more'), 'node/' . $nid, array('attributes' => array('class' => t('node-readmore-link')))); ?></span>

    <?php print render($content['links']['comment']);?>                           // Added this line to print the comment link

Thanks,
Komal

merlin2288’s picture

Issue tags: +comments

@ Komal

Thank you for the code snippet above. Edited the file as you suggested and it solved my problem... almost. I'm having a slight formatting issue with the "Add new comment" link and the "comment_add.png" image overlapping. You can see what I'm talking about at:

http://byebyesuckas.com

I've tried to add padding to the image as well as a right side margin, but the placement of the text link appears to not be based on the image. I guess I don't know enough about theming as I'm relatively new to Drupal.

Are you having this issue? If not, did you make a modification to the "comments.css" file or do you have suggestions?

Thanks again

komal.savla’s picture

Hi,

Add the following css in your "comment.css" file :

ul.links li.comment-add a {
  padding: 0 0 0 1em;
}

Thanks,
Komal

merlin2288’s picture

Awesome! Thanks for the help. Very much appreciated!

angelloser’s picture

Title: Comments on Teaser » Fatal error: Call to undefined function menu_get_menus()
Assigned: Unassigned » angelloser
Category: support » bug
vegantriathlete’s picture

Title: Fatal error: Call to undefined function menu_get_menus() » Comments on Teaser
Category: bug » support
Status: Active » Closed (fixed)

The changes in #5 made no sense and are causing the still open fatal error issue to be marked as duplicate.