|
From: <me...@st...> - 2005-06-28 13:16:53
|
>>>>> "john" == John S J Anderson <gen...@ge...> writes:
john> 2) encode '?_state=Login' into the URL in the href attribute (or various
john> other schnanigans with specifying some state in the URL -- use
john> 'state=login' and switch on that in the respond_per_page() in the
john> base class, for example)
I've used this, and recommend this. In the fictional
CGI::Prototype::Cookbook, I have this:
USE selfcgiurl = url(self.CGI.url({ path => 1 }));
BLOCK link;
# [ state = "new state" ] (defaults to current state)
# [ other = { ... } ] (additional URL params)
csp = self.config_state_param;
DEFAULT state = self.param(csp);
DEFAULT other = {};
other.$csp = state;
selfcgiurl(other);
END;
Then I can say:
[% WRAPPER link state = "Login" %]Login![% END %]
Note that this requires config_state_param to not begin with an
underscore or dot, thanks to some odd interactions with TT's
restrictions.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me...@st...> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
|