Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: Maintain menu value - help.. anyone???

Quote Reply
Re: Maintain menu value - help.. anyone??? In reply to
Thanks for your suggestions, but i've got no idea how to modify those subroutines to work :(

I've just done this hack which is working, but obviously it isn't using the Link def file - which would be nicer as the menu selection list would then be automatically updated when the database (and def file) is added to.

If anyone has time could they post how to do this the correct way? Getting the info from the Links def file?

Thanks.


sub site_html_add_failure {
# --------------------------------------------------------
# This routine determines how the add failure page will look like.
#
my ($tags, $dynamic) = @_;
my $template = defined $dynamic ? $dynamic->param('t') : undef;
(ref $tags eq 'HASH') or croak "HTML_TEMPLATES: Argument '$tags' must be hash reference";

my %LIST = (
'' => 'Select One...',
'Business' => 'Business',
'Non-profit' => 'Non-profit',
'Personal' => 'Personal',
'Club/Org' => 'Club/Org',
'Government' => 'Government'
);

my ($linktypelist, $key, $output);

$output = "<SELECT NAME='Link_Type'>";
while (my ($key, $value) = each %LIST) {
if ($tags->{'Link_Type'} eq "$key"){ $output .="<option value='$key' SELECTED>$LIST{$key}\n";}
else { $output .="<option value='$key'>$LIST{$key}\n";}
}
$output .= "</select>";


defined $dynamic and &load_user ($dynamic, $tags);
my $output = &load_template ('add_error.html', {
Link_Type_List => $output,
%$tags,
%GLOBALS
}, undef, $template);
defined $dynamic and &clean_output($dynamic, \$output);
print $output;
}

Subject Author Views Date
Thread Maintain menu value - help.. anyone??? ryel01 4968 Oct 24, 2000, 12:30 AM
Thread Re: Maintain menu value - help.. anyone???
pugdog 4911 Oct 24, 2000, 5:58 AM
Thread Re: Maintain menu value - help.. anyone???
Stealth 4915 Oct 24, 2000, 8:08 AM
Post Re: Maintain menu value - help.. anyone???
pugdog 4885 Oct 24, 2000, 4:21 PM
Thread Re: Maintain menu value - help.. anyone???
ryel01 4894 Oct 24, 2000, 4:50 PM
Thread Re: Maintain menu value - help.. anyone???
pugdog 4896 Oct 24, 2000, 5:50 PM
Thread Re: Maintain menu value - help.. anyone???
ryel01 4887 Oct 24, 2000, 8:33 PM
Thread Re: Maintain menu value - help.. anyone???
pugdog 4892 Oct 24, 2000, 10:03 PM
Post Re: Maintain menu value - help.. anyone???
ryel01 4886 Oct 24, 2000, 10:19 PM
Thread Re: Maintain menu value - help.. anyone???
Stealth 4858 Oct 26, 2000, 7:49 PM
Thread Re: Maintain menu value - help.. anyone???
ryel01 4838 Oct 29, 2000, 11:50 PM
Post Re: Maintain menu value - help.. anyone???
Stealth 4820 Oct 30, 2000, 7:25 AM