Thursday 19 February 2004 7:33:12 am
hi all
i placed my override of user/login.tpl in my pagelayout id'like it to display the login form if the user is anonymous and to display the "logout" link (without form!!) in the user is logged. that's the code: <form method="post" action={"/user/login/"|ezurl}>
{*<div class="maincontentheader">
<h1>{"Login"|i18n("design/standard/user")}</h1> </div>*}
{section show=$User:warning.bad_login}
<div class="warning">
<h2>{"Could not login"|i18n("design/standard/user")}</h2>
<ul>
<li>{"A valid username and password is required to login."|i18n("design/standard/user")}</li>
</ul>
</div> {section-else}
{section show=$site_access.allowed|not}
<div class="block">
<label for="id1">{"Login"|i18n("design/standard/user")}</label><div class="labelbreak"></div>
<input class="halfbox" type="text" size="10" name="Login" id="id1" value="{$User:login}" />
</div>
<div class="block">
<label for="id2">{"Password"|i18n("design/standard/user")}</label><div class="labelbreak"></div>
<input class="halfbox" type="password" size="10" name="Password" id="id2" value="" /> </div>
<div class="buttonblock">
<input class="defaultbutton" type="submit" name="LoginButton" value="{'Login'|i18n('design/standard/user','Button')}" />
<input class="button" type="submit" name="RegisterButton" value="{'Sign Up'|i18n('design/standard/user','Button')}" /> </div>
<input type="hidden" name="RedirectURI" value="{$User:redirect_uri}" />
{/section} {section-else}
{* HERE I WANT TO DISPLAY THE STRING *}
{section show=$site_access.allowed} {*welcome hoe, logout*}
{/section} </form> i've seen that i check if a user is not logged with {section show=$site_access.allowed|not} how to know if is the user logged? best regards alessandro
|