Gossamer Forum
Home : Gossamer Threads Inc. : Discussion :

Re: [hennagaijin] GT::CGI::redirect from within a template

Quote Reply
Re: [hennagaijin] GT::CGI::redirect from within a template In reply to
Quote:
Is it possible to call <%GT::CGI::redirect($someurl)%> from within a template? I'm having trouble getting that to work... Is it because it's too late to send HTTP headers at the top of a template file? Any suggestions would be appreciated.

Yes, it's too late to send headers by the time the template is parsed/printed. You need to send them before the template is done. You can just do:

print $IN->redirect("some url");

Cheers,

Alex
--
Gossamer Threads Inc.
Subject Author Views Date
Thread GT::CGI::redirect from within a template hennagaijin 7217 Dec 24, 2003, 6:52 AM
Thread Re: [hennagaijin] GT::CGI::redirect from within a template
pugdog 7048 Dec 24, 2003, 8:32 AM
Thread Re: [pugdog] GT::CGI::redirect from within a template
hennagaijin 7160 Dec 24, 2003, 8:38 AM
Post Re: [hennagaijin] GT::CGI::redirect from within a template
Andy 7047 Dec 24, 2003, 11:37 AM
Post Re: [hennagaijin] GT::CGI::redirect from within a template
pugdog 7037 Dec 24, 2003, 11:53 PM
Thread Re: [hennagaijin] GT::CGI::redirect from within a template
el noe 7024 Dec 25, 2003, 4:50 AM
Post Re: [el noe] GT::CGI::redirect from within a template
hennagaijin 7035 Dec 25, 2003, 5:43 AM
Post Re: [hennagaijin] GT::CGI::redirect from within a template
Alex 6982 Dec 30, 2003, 7:30 PM