[TYPO3-english] Sign in - Log out, Register links

Jigal van Hemert jigal at xs4all.nl
Sat Jun 12 07:10:39 CEST 2010


ktt wrote:
> I would like to place Sign in if user not logged, Log out if user
> is logged and Register links on top of each page.
> sr_feuser has login box but is it possible to use only links?
> I saw kc_loginstatus extension, probabaly there are other solutions?

Visibility of those links can be controlled by the Access settings of 
the pages they link to: Hide at login, Show at any login.

The 'sign in' page can be "Hide at login", so it will only be visible to 
people who are not logged in, etc.

You can produce a 'Log out' action in a link, by adding the parameters 
&logintype=logout

To make it easier to maintain:

[10] Login : page with login box
[11] Register : page with registration form
[12] Edit registration : page with edit form for registration

[20] login/register menu
  +-- [21] Sign in : shortcut to 10, Hide at login
  +-- [22] Register : shortcut to 11, Hide at login
  +-- [23] Edit registration : shortcut to 12, Show at any login

Make a menu of subpages of 20:

10 = COA
10 {
	10 = HMENU
	10 {
		special = directory
		special.value = 20
		1 = TMENU
		1 {
			...
		}
	}
}

Add a link to logout:

[loginUser = *]
10 {
	5 = TEXT
	5 {
		value = Log out
		typolink.parameter = 10
		typolink.additionalParams = &logintype=logout
	}
}
[end]

(You will need to add wraps, etc. to give structure to the menu and the 
extra link. This is only to show how to make the menu-items themselves.)


Result is that you have for visitors who are not logged in:
'Sign in', 'Register'
and after the are logged in:
'Log out', 'Edit registration'

-- 
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-english mailing list