You can do this from an exported method:
use CGI qw/:standard/;
sub thing : Exported {
my ($self, $r) = @_;
my $year = &getYear($args); # internal "private" sub imported into the
same namespace - usually by being in the same file as the caller
# etc
my $url =
"http://localhost/cgi-bin/my_db.cgi/some_table/list/?
year=$year&month=$month&day=$day";
print redirect ($url); # you might have to use the cgi the OO way
depending on your setup.
}
So go to http://localhost/some_table/thing and you're redirected to
today's search.
You could also do this in the browser with a static page with some
javascript to calculate the form's action url based on whatever
criteria you chose.
You could provide a link to these searches with templates using the TT
Date plugin see Template::Plugin::Date for details.
Hi all,
I imagine this should be a simple task, but don't know where to start.
I want a page where I retrieve today's results from a file. I can do
this easily
from a static HTML link, by assembling a CGI query of the type
http://localhost/cgi-bin/my_db.cgi/some_table/list/?
year=2005&month=12&day=28
Now I would like this link to be automatically created so it will
always point to today's data.
My guess would be to set variables for year, month and day and then
pass these through
to the relevant template. I am stuck on setting user defined
variables, not just the built
in Maypole ones
Regards,
Kim
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users