Even though all BEE Portal sites come with login/logout facility, you don't always need to provide a login/logout form unless you want your user to login as well. (The admin user can always login via the admin site.) But if do allow user login, this is how you do it.
There are three things about login and logout:
- The Login/Logout form,
- Error message from the login/logout process, and
- the Admin utility links.
First, let us look at the Login/Logout form:
Note: {SiteURL} is {pt%SiteURL} appended with a "/" at the end.
<form method=post action="${SiteURL}index.htm"> <beeaccess> Logged in as ${sys%auth:loginname}<br> <input class="button" type=submit name=Submit value=Logout> <beeelse> Username:<input class="field" type=text name=username size=10><br> Password:<input class="field" type=password name=password size=10><br> <input class="button" type=submit name=Submit value=Login> </beeaccess> </form>
Secondly, insert the Error message, which can be put anyway but it is recommended to put it immediately before or after the login form so as to catch the user's eyes:
<beeif if="'{pt%AuthStatus}'"> ${pt%AuthMessage} (Error ${pt%AuthStatus}) </beeif>
Finally, the Admin user has some special utilities available: The Menu Edit page, the Organizer and the Admin site:
<beeaccess "admin"> <a class="pagebaritem" href="javascript:showMenuEditPage()" title="Add, Modify or Delete Menu">Menu Edit</a><br> <a class="pagebaritem" href="javascript:showOrganizer()" title="Add, Copy or Delete Pages or Files">Organizer</a><br> <a class="pagebaritem" target="${MainTarget}" href="${SiteURL}admin/" title="Administer the web site">Admin Site</a><br> </beeaccess>
|