[support] Hiding nodes in long threads
Adam Gaffin
AGaffin at nww.com
Wed Oct 10 19:00:16 UTC 2007
Some of our bloggers write really long posts. If those posts get a lot
of comments, it can be a bit confusing to the user who clicks on the
"next" link in the pager, because instead of more comments, he at first
sees the long post, which he then has to know (or figure out) to scroll
down beyond.
To get around this, I put the following in our node.tpl.php to hide the
node on page=2, 3, etc.
<?php
$blanknode = $_SERVER['QUERY_STRING'];
if ($node->nid){
if (stristr($blanknode, 'page')!== FALSE) {echo '<style> .node
{display:none;}</style>';}
;}
?>
What I know about good coding could fit in a thimble, however, so would
there be a better way to do this?
Thanks!
Adam Gaffin
Executive Editor, NetworkWorld.com
agaffin at nww.com / (508) 490-6433 / http://www.networkworld.com
"I programmed my robotic dog to bite the guy who delivers the electronic
mail." -- Kibo
More information about the support
mailing list