[TYPO3-english] Typoscript redirect

Nathan L typo3 at k9tfk.com
Mon Aug 10 17:39:18 CEST 2009


I can confirm that this works, but it was easier than I expected.

1. First I put the login form html into my static 404.html file.
2. I put this input: <input class="hidden" type="hidden" name="redirect_url"
value="###CURRENT_URL###" /> in the form.  Typo3 replaces that hashed tag
with whatever the url of the page they requested is.
3. Edit the login form on your login page to include "defined by
GET/POST-Vars" in the "Redirect Options" tab.

I just tried it and it worked!

I think you could make it a little nicer by hiding the form by default using
style="display: none" then look at the value of "###REASON###" using
javascript.  If the reason says "Subsection was found and not accessible"
then you could unhide the form.

Hope this helps...
--Nathan

On Mon, Aug 10, 2009 at 10:19 AM, Nathan L <typo3 at k9tfk.com> wrote:

>
>
> I think it may be possible to hard-code a static html login form that uses
> javascript to put the value of location.href into a hidden form element
> named "return_url" which the login form should use to redirect once it
> receives a successful login.  Off to go code this...
>

-- 
Nathan Lenz


More information about the TYPO3-english mailing list