Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Deleting a Global

Quote Reply
Deleting a Global
Hi,

I deleted a global through the admin but it does not get removed. I viewed the global.txt file in the luna/local folder and it was deleted. I cleared all cookies etc. but it still shows from the admin side.

Any idea what the problem could be?
Quote Reply
Re: [rascal] Deleting a Global In reply to
If it's a default global (ie. one that comes with the template set), then you can't delete it.

Adrian
Quote Reply
Re: [brewt] Deleting a Global In reply to
Thanks for your reply.

This is the global I cannot delete:

display_total


sub {
my $tags = shift;
my $total = $tags->{link_hits};
my $high = $IN->param('mh');
my $low = 1;
my $page = $tags->{nh} || 1;

if ($high > 0) {
$high = $IN->param('mh');
}else{
$high = $Links::CFG->{search_maxhits};
}

if ($page > 1) {
$low = (($page - 1) * $high) + 1;
}

my $top = ($high + $low > $total) ? $total : (($high + $low) - 1);

$low =~ s/^([-+]?\d+)(\d{3})/$1,$2/;
$top =~ s/^([-+]?\d+)(\d{3})/$1,$2/;
$total =~ s/^([-+]?\d+)(\d{3})/$1,$2/;

return "$low - $top of $total";

}

It is not in the global.txt file but it still shows when viewing Template Globals in the admin.
Quote Reply
Re: [rascal] Deleting a Global In reply to
Found the problem, had a duplicate global.txt file in the admin/templates/luna folder.


Have to be more careful!