I'm running a forum. When more than 30 comments are made on a single subject, a second page is created. This is all wonderful and great, except for the fact that the original post shows up on the second page.

I understand that this is due to the nature of the node/comment hierarchy, but it bothers me to no end.

Is there a way to prevent the node from being displayed on the 2nd, 3rd, 4th, etc. page of comments?

Comments

tesla.nicoli’s picture

subscriber mark - also interested in this.

Dries’s picture

There is no configuration toggle for this. However, you can probably implement this at the theme system level. If you adapt the code or function that renders a node (eg. themes/engines/phptemplate/phptemplate.engine or themes/$name/node.tpl.php if you are using PHPTemplate), you can choose not to display the node when a particular variable (eg. page=x, don't know the name by head) is part of the URL or query string.

Mateo’s picture

I might just have to fiddle with my node-forum.tpl.php file and do this.

Mateo’s picture

Code used was as followed:

if (!$_GET['from']) {
//enter template here
}

It simply checks for the existance of a $_GET variable 'from'

paintingguy’s picture

I want to do this as well. Would the code above work for Drupal 9?

Thanks!