faq_search.find.inc, line 19.

From:

<?php
while ($row = db_fetch_object($result)) {
    $string .= "<a href='node/". $row->nid ."'>". $row->question ."</a>";
  }
?>

To:

<?php
while ($row = db_fetch_object($result)) {
    $string .= "<a href='/".drupal_lookup_path('alias', 'node/'.$row->nid)."'>". $row->question ."</a>";
  }
?>

Thanks for the module!! Hope this improves it.

Comments

johnpv’s picture

Excellent point, thanks! However, what if there is an FAQ that does not have an alias, that node will then be linked to the root ("/")?

johnpv’s picture

So how about this instead:

<?php
while ($row = db_fetch_object($result)) {
    $string .= "<a href='/". drupal_get_path_alias('node/'. $row->nid)."'>". $row->question ."</a>";
  }
?>
johnpv’s picture

Status: Needs review » Fixed
bensnyder’s picture

:)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.