Generally, here's how I've dealt with it:

Make your link on the welcome page something along the lines of:

<a href="_state=login'>Log In</a>

In you'll need to cover both the case where they're coming to the
login page via a link (hint: make sure the username and password params
aren't set or make sure that only _state is set), and the case where the
username and password are set and should be processed.


On 6/28/05 8:59 AM, "John S J Anderson" <[EMAIL PROTECTED]> wrote:

>   I'm just starting to try to wrap my head around C::P::Hidden (or vice
>   versa), so it's entirely possible I'm not thinking about this properly
>   -- but I can't figure out the Right Way to link to a non-default page.
>   Suppose I have two "pages": Welcome and Login. (A "page" is a
>   combination of a .pm and a .tt; there's only one actual CGI.) I have
> sub config_default_page { "Welcome" }
>   in the base
>   In, I want to have an <a> element where the href attribute
>   takes me to the Login page. It seems like I have two options:
> 1) use an onClick attribute to manipulate the hidden _state field to
>    change its value to 'Login'
> 2) encode '?_state=Login' into the URL in the href attribute (or various
>    other schnanigans with specifying some state in the URL -- use
>    'state=login' and switch on that in the respond_per_page() in the
>    base class, for example)
>   Is that pretty much accurate or is there some slickness I'm missing?
> thanks,
> john.


Andrew Gianni
Administrative Computing Services
State University of New York at Buffalo
215 Millard Fillmore Academic Complex
Amherst, NY 14261
(716) 645-3587x7124

SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast.
cgi-prototype-users mailing list

Reply via email to