Sorry, i forgot to use
Hi Skrol, just starting to set up my website using TBS and appreciate your suggestion on these:
SITUATION:
1. Login box (with fields username, password, remember me, sign up) resides in a separate template. Lets call this template, "left_side_of_page.htm". This template has other components other than the login box.
2. Logout box (with fields logout, my account) also resides in another template. lets call this template "page_header.htm". Also, this template has other components other than the logout box.
3. "left_side_of_page.htm" and "page_header.htm" are used as subtemplates only.
DESIRED ACTION:
When a user is already logged in, he cannot see the Login box (at "left_side_of_page.htm" subtemplate) on any page but can access the Logout box (at "page_header.htm" subtemplate). In the same manner, if he's not logged in yet the Logout box is inaccesible while the Login box accesible.
MAIN TEMPLATE ("main_template.htm") :
<body>
[onload;file='templates/page_header.htm']
[onload;file=[var.tmpl_menu]]
[onload;file=[var.tmpl_maincontent]]
[onload;file='templates/footer.htm']
</body>
|
PHP:
<?php
include_once('include/tbs_class_php5.php');
$TBS = new clsTinyButStrong();
.
.
.
$tmpl_menu='templates/left_side_of_page.htm';
$tmpl_maincontent='templates/regmember.htm';
.
.
$TBS->LoadTemplate('templates/main_template.htm');
$TBS->Show();
?>
|
MY QUESTION IS:
How do i set up the Logout form at "page_header.htm" and Login form at "left_side_of_page.htm" to get the desired action. Please note that "page_header.htm" is constant in "main_template.htm" while "left_side_of_page.htm" is called by [var.tmpl_menu], and loaded as "$tmpl_menu='templates/left_side_of_page.htm'" in PHP.
Thanks a lot.