Newbee Question about how smarty works
| From: | Mark Dyer | Date: | Mon, 10 Nov 2003 02:03:55 +0000 |
| Subject: | Newbee Question about how smarty works | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10512@lists.php.net to get a copy of this message | ||
Hello,
I'm a newbee with Smarty but really wanting to get into this.
Inside my template I would like to show different templates depending on if
they have logged into the site or not.
I have a question and looking for some example code. I'm not if I should
which way I am meant to use smarty
1
Do I check if the user is logged in from my index.php file than call the
related template ie loginbox or user logged in links and save this output to
a var.
Once I have processed all the above information do I than call the main
index.tpl and pass the vars calcuated above.
or 2
Call the template. Have an if (userlogged()) statment in the template which
calls another template from inside the template.
If anyone has some great resouces they recommend it'll be really apperiated.
Regards
Mark Dyer
MSN: support@webbiznz.net.nz