Hi,
I'm really banging my head on what seems like a pretty easy problem. I want to display just the non-linked category 'Name' and not the linked 'Full_Name' in the seach results. Here's where I'm at -- but it's failing miserably:
# Join the link results by category if we are grouping.
my @link_results_loop;
if ($CFG->{build_search_gb}) {
foreach my $cat (sort keys %link_output) {
my $title = Links::Build::build ('title_linked', { name => $cat, complete => 1, home => 0 });
my $catDB = $DB->table('Category');
my $cat_name = $catDB->select ('Name');
my $title_xml = $cat_name;
$link_results .= "<p>$title" . join ("", map { Links::SiteHTML::display('link', $_) } @{$link_output{$cat}});
$link_output{$cat}->[0]->{title_linked} = $title;
$link_output{$cat}->[0]->{cat_title_xml} = $title_xml;
push @link_results_loop, @{$link_output{$cat}};
}
}
else {
$link_results = join ("", map { Links::SiteHTML::display('link', $_) } @{$link_output{none}});
push @link_results_loop, @{$link_output{none}};
}
I think I'm botching it in the Select command.
Many thanks --
Mike
I'm really banging my head on what seems like a pretty easy problem. I want to display just the non-linked category 'Name' and not the linked 'Full_Name' in the seach results. Here's where I'm at -- but it's failing miserably:
# Join the link results by category if we are grouping.
my @link_results_loop;
if ($CFG->{build_search_gb}) {
foreach my $cat (sort keys %link_output) {
my $title = Links::Build::build ('title_linked', { name => $cat, complete => 1, home => 0 });
my $catDB = $DB->table('Category');
my $cat_name = $catDB->select ('Name');
my $title_xml = $cat_name;
$link_results .= "<p>$title" . join ("", map { Links::SiteHTML::display('link', $_) } @{$link_output{$cat}});
$link_output{$cat}->[0]->{title_linked} = $title;
$link_output{$cat}->[0]->{cat_title_xml} = $title_xml;
push @link_results_loop, @{$link_output{$cat}};
}
}
else {
$link_results = join ("", map { Links::SiteHTML::display('link', $_) } @{$link_output{none}});
push @link_results_loop, @{$link_output{none}};
}
I think I'm botching it in the Select command.
Many thanks --
Mike