Drupal search module is directly linked to comments
On my drupal search results links page directly to the post comments besides the post itself. Looking at the search.module file the relevant code seems to be.
$output = ' <dt class="title"><a href="'. check_url($item['link']) .'">'. check_plain($item['title']) .'</a></dt>';
The problem is I can't figure out where the $ item ['link'] actually comes from, or how to get the link variable for the comments there. Any help you could provide would be great.
0
a source to share
1 answer
Do you want to link to comments in addition to linking directly to node? It's not that hard ...
For the same page, you need to change the output to something like:
$output = ' <dt class="title"><a href="'. check_url($item['link']) .'">'. check_plain($item['title']) .'</a></dt><dd><a href="'. check_url($item['link']) .'#comments">'. check_plain($item['title']) .'</a></dd>;
Of course, you will want to chat a little with the topic.
0
a source to share