1) In order to have the category diplayed under the link in your search results and NOT in your category pages, you will need to use a different template file.....
a) Copy your sub site_html_link in the HTML_Templates.pm file and call the new subroutine: sub site_html_search_link.
b) Then in this new subroutine, load searchlink.html NOT link.html.
c) Create a new template file called searchlink.html and upload it in your templates directory.
2) Then in your search.cgi, replace all occurrences of &site_html_link with &site_html_search_link.
3) Rem out (#) or delete the following line of code in the search.cgi file:
$link_results .= "
" . &search_build_linked_title ($name) . "
\n";
in the sub search routine.
4) Then in your sub site_html_search_link routine in the HTML_Templates.pm file, add the following codes:
# Print Category and link to Category
my $catname = &Links::DB_Utils::get_category_name($rec->{CategoryID});
my $category = &Links::DB_Utils::build_clean_name($catname);
Then define the following tags in this subroutine:
printcat => $catname,
Category => $category
5) Then in your searchlink.html file, add the following codes:
<a href="/<%Category%>/"><%printcat%></a>
Regards,
Eliot Lee
a) Copy your sub site_html_link in the HTML_Templates.pm file and call the new subroutine: sub site_html_search_link.
b) Then in this new subroutine, load searchlink.html NOT link.html.
c) Create a new template file called searchlink.html and upload it in your templates directory.
2) Then in your search.cgi, replace all occurrences of &site_html_link with &site_html_search_link.
3) Rem out (#) or delete the following line of code in the search.cgi file:
Code:
$link_results .= "
" . &search_build_linked_title ($name) . "
\n";
in the sub search routine.
4) Then in your sub site_html_search_link routine in the HTML_Templates.pm file, add the following codes:
Code:
# Print Category and link to Category
my $catname = &Links::DB_Utils::get_category_name($rec->{CategoryID});
my $category = &Links::DB_Utils::build_clean_name($catname);
Then define the following tags in this subroutine:
Code:
printcat => $catname,
Category => $category
5) Then in your searchlink.html file, add the following codes:
Code:
<a href="/<%Category%>/"><%printcat%></a>
Regards,
Eliot Lee