[TYPO3] Redirection to Login-Page - and back (SOLUTION)

Daren Thomas daren.thomas at pvcomp.ch
Tue Jan 31 16:00:32 CET 2006


Here is how to do Redirection to Login-Page without extending the
newloginbox Extension:

1. Install the newloginbox-Extension ("New front end login box")

2. Drop it onto a page (the content element name is "Better login-box",
which is a bit confusing - please don't use different names for the same
thing!)

3. Edit your Template TS for the menu:

	# here, temp.nav is a HMENU. 
	# We want to redirect all level-2 to the login page
	# if their access is restricted
	temp.nav.2 {

		# use your own config here:
		NO.allWrap = <div class="nav-level2"> | </div>
		ACT = 1
		ACT.allWrap = <div class="nav-level2-active"> | </div>

		# redirect magic:
		# 90 is the uid of the login page (the one with the
"Better login-box"
		# the parameter 'redirect_url=###RETURN_URL###' is
interpreted by the newloginbox
		showAccessRestrictedPages = 90
    		showAccessRestrictedPages.addParams =
&redirect_url=###RETURN_URL###
   }

4. You are now set: Access restricted pages will show up in level-2
(repeat for other levels if wanted) and will first show your login page
before being redirected back after login.

Cheers, 

Daren Thomas

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Daren
Thomas
Sent: Wednesday, January 25, 2006 3:55 PM
To: TYPO3 English
Subject: Re: [TYPO3] Redirection to Login-Page - and back

Could someone please point me to some source of documentation on this
problem? 

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Daren
Thomas
Sent: Tuesday, January 24, 2006 4:58 PM
To: typo3-english at lists.netfielders.de
Subject: [TYPO3] Redirection to Login-Page - and back

Dear List,

I have tried for the better part of this afternoon to get this working
and have to fall back to asking someone more experienced with typo3:
you.

The site I'm building has roughly following structure:

+- Home *
+- Extranet *
+- Site *
+- About us
  +- some sub-pages
+- A very important page
  +- important sub-page (PROTECTED)

(* meens not in menu)

The Extranet-Page contains a Login box (yes, I have also tried the
newloginbox, also with the extension with redirection).

I am trying to achieve the following behavior:
- User opens protected "important sub-page"
- User is redirected to Extranet
- User logs on
- User is redirected to "important sub-page"

I have set the "showAccessRestrictedPages" setting in the site template,
so the "important sub-page" appears in the menu, I also used
"showAccessRestrictedPages.addParams =
&return_url=###RETURN_URL###&pageId=###PAGE_ID###", so when the
"important sub-page" is redirected to the Extranet page, the return_url
parameter is set to the url of the "important sub-page".

But what should I do with that parameter after login? Current behavior:
User is informed that the login was successfull, current page is
Extranet.

Thank you for your time and patience,

Daren Thomas
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list