Jonathan you are right, it was my mistake there seems to be no way to integrate the results of the global in the links results.
But this is not necessary, because I only want to get results from the custom table if there are no results from the links table.
my $tags = shift;
my $db= $DB->table('cars');
my $sth = $db->select({ brand => $tags->query });
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('brand', $rec);
}
return $output;
}
Now, I have an addidtional question about your global....how can I make this search global more sophisticated?
for example: if the value in 'brand' is "Mercedes Benz Cars"
and the user does a search query for Mercedes Benz the global should do a search for +Mercedes +Benz
and find the value 'Mercedes Benz Cars' as a result.
Thank you for your help
But this is not necessary, because I only want to get results from the custom table if there are no results from the links table.
Code:
sub { my $tags = shift;
my $db= $DB->table('cars');
my $sth = $db->select({ brand => $tags->query });
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('brand', $rec);
}
return $output;
}
Now, I have an addidtional question about your global....how can I make this search global more sophisticated?
for example: if the value in 'brand' is "Mercedes Benz Cars"
and the user does a search query for Mercedes Benz the global should do a search for +Mercedes +Benz
and find the value 'Mercedes Benz Cars' as a result.
Thank you for your help