Gossamer Forum
Quote Reply
Re: [nir] Clean Title In reply to
Try this global:

Code:
sub {
my @loop;

foreach (split /\n/, $_[0]) {
s/[)(-\+!:@#^&_|\><}{\]\[,'\/\.]//g;
my $hash;
$hash->{Title} = $_;
$hash->{CleanTitle} = $_;
$hash->{CleanTitle} =~ s/\s+/-/g;
$hash->{CleanTitle} =~ s/\-+/-/g;
push @loop, $hash;
}

return { format_page_loop => \@loop };

}

Call it in the same way as you were with the other global.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Aug 20, 2009, 2:42 AM
Subject Author Views Date
Thread Clean Title nir 9680 Aug 19, 2009, 7:34 AM
Thread Re: [nir] Clean Title
Andy 9522 Aug 19, 2009, 7:58 AM
Thread Re: [Andy] Clean Title
nir 9471 Aug 20, 2009, 1:07 AM
Thread Re: [nir] Clean Title
Andy 9509 Aug 20, 2009, 1:55 AM
Thread Re: [Andy] Clean Title
nir 9519 Aug 20, 2009, 2:05 AM
Thread Re: [nir] Clean Title
Andy 9491 Aug 20, 2009, 2:08 AM
Thread Re: [Andy] Clean Title
nir 9481 Aug 20, 2009, 2:38 AM
Thread Re: [nir] Clean Title
Andy 9476 Aug 20, 2009, 2:42 AM
Post Re: [Andy] Clean Title
nir 9461 Aug 20, 2009, 3:21 AM
Thread Re: [Andy] Clean Title
nir 9113 Jan 31, 2010, 6:04 AM
Thread Re: [nir] Clean Title
Andy 9088 Jan 31, 2010, 6:13 AM
Thread Re: [Andy] Clean Title
nir 9091 Jan 31, 2010, 6:35 AM
Thread Re: [nir] Clean Title
Andy 9076 Jan 31, 2010, 8:11 AM
Thread Re: [Andy] Clean Title
nir 9061 Feb 1, 2010, 2:21 AM
Post Re: [nir] Clean Title
Andy 9059 Feb 1, 2010, 3:50 AM