Wednesday 17 May 2006 10:07:04 am
Coulibaly, If I understand correctly, you're wanting to show the "Connect" button if no user is logged in, and show the "Disconnect" button if a user is logged in. Yes? Assuming the above, I believe something like the below would work.
{def $user=fetch( 'user', 'current_user' )}
{section show=eq($user.contentobject.name, 'Your Anonymous User Name')}
// User is not logged in, Connect button code here (input, a href, whatever)
{section-else}
// User is logged in, Disconnect button code here (input, a href, whatever)
{/section}
Put that where the button should show up.
Reference: http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/user/fetch_functions/current_user
|