debiandude has asked for the wisdom of the Perl Monks concerning the following question:
I'm reding my site using HTML TEMPLATE and CGI::APPLICATION so I can use a common code within all my sites. Anyway here is my question:
index.pl is the script that calls everything. Its has several run modes, articles, admin, and home.
By default it lodes up home.
Now if I want to display the articles I would use this: index.pl?node=articles
However I want to specify a specific article, so I would like it to recognize this:
index.pl?node=articles?15
And goto the 15th article.
This is what the setup function looks like:
sub setup { my $self = shift; $self->run_modes( 'home' => 'home', 'articles' => 'articles', 'admin' => 'admin', ); $self->param('dbh' => DBI->connect( "DBI:mysql:tro:localhost", "root", "", {RaiseError => 1}) ); $self->tmpl_path('/var/www/petnuch/html_templates'); $self->start_mode('home'); $self->mode_param('node'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Application Question
by elusion (Curate) on May 19, 2003 at 02:22 UTC | |
by debiandude (Scribe) on May 19, 2003 at 02:28 UTC |