[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] condensing the URL in an ActionMap
I've got my ActionMap set up like this:
ActionMap category <<EOR
sub {
$CGI->{mv_nextpage} = 'category_page';
}
EOR
The URLs it will be fielding are like this:
/category/posters/p1.html
and I'd like to have the "category" portion removed which I think is a
pretty standard component of most ActionMaps. Here's an example ActionMap
from Mike Heins:
ActionMap category <<EOR
sub {
my $path = shift;
my ($catname, $page) = split m:/:, $path;
$CGI->{somespec} = $catname;
$page--;
$CGI->{starting_match} = $page * 9;
$CGI->{mv_nextpage} = 'some_display_page';
return;
}
EOR
What can I change my ActionMap to in order to give it the "condensing"
functionality? I don't know anything about Perl. Thanks!
- Grant