Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Payooo] Search results customization: Edit Log

Here is the list of edits for this post
Re: [Payooo] Search results customization
Looking at Links::User::Search, it seems all the tags from the Category table, plus 'title_linked' should be available in the <%loop category_results_loop%>...<%endloop%> construct:

Code:
# Now format the category results.
my $count = 0;
my ($category_results, @category_results_loop);
if (!$filter and $cat_count) {
while (my $cat = $cat_sth->fetchrow_hashref) {
last if ($count++ > $args->{mh});
my $title = Links::Build::build ('title_linked', { name => $cat->{Full_Name}, complete => 1, home => 0 });
$category_results .= "<li>$title\n";
$cat->{title_linked} = $title;
push @category_results_loop, $cat;
}
}


The available tags in the <%loop%> portion include:

Code:
$VAR = [
{
'Description' => 'SUB0 ',
'Meta_Description' => '',
'Name' => 'Games & Fun',
'Header' => '',
'Has_Changed_Links' => 'No',
'Full_Name' => 'Hobbies and Entertainment/Games & Fun',
'title_linked' => ' <a href="http://identitydots.com/LinkSQL/pages/Hobbies_and_Entertainment/index.html">
Hobbies and Entertainment</a> : <a href="http://identitydots.com/LinkSQL/pages/Hobbies_and_Entertainment/Games___Fun/index.html">
Games & Fun</a>',
'FatherID' => '47',
'Newest_Link' => '2001-03-21',
'Category_Template' => undef,
'Timestmp' => '20020120115853',
'Footer' => '',
'Has_New_Links' => 'No',
'Number_of_Links' => '34',
'ID' => '10',
'Meta_Keywords' => '',
'Description_Long' => undef
}
];




But, as you'[ll notice, it doesn't include the "extra" tags that you get in category.html.

Maybe Alex should consider bringing this into sync with the other category printing routines.

From Links::Build

Code:
# Clean up the name.
my $clean_name = $cat_db->as_url ($category->{Full_Name});
if ($opts->{nh} and ($opts->{nh} > 1)) {
$display{title_linked} = build ('title_linked', $category->{Full_Name} . '/' . Links::language('LINKS_PAGE', $opts->{nh}));
$display{title} = build ('title_unlinked', $category->{Full_Name} . '/' . Links::language('LINKS_PAGE', $opts->{nh}));
}
else {
$display{title_linked} = build ('title_linked', $category->{Full_Name});
$display{title} = build ('title_unlinked', $category->{Full_Name});
}
$display{category_name_escaped} = GT::CGI->escape ($category->{Full_Name});
$display{category_clean} = $display{title};
($display{category_short}) = $display{category_name} =~ m,/?([^/]+)$,;


This is what makes the other tags available. You might want to hack them in to the Search.pm file.
[/font]


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.

Last edited by:

pugdog: Feb 22, 2002, 5:41 AM

Edit Log: