Evaluating a page in a different order
| From: | cay at blueyonder dot co dot uk | Date: | Wed, 03 Dec 2003 11:50:27 +0000 |
| Subject: | Evaluating a page in a different order | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171663@lists.php.net to get a copy of this message | ||
Hey all,
I have a php page class that i use as a template for my website. Every page in my website creates an
instance of the class and passes values like title and meta tag keywords. The class includes the
layout from different files e.g. title.lay contains the title and logo.
In the top right hand corner of my page i have a login status, which displays if the user is logged
in or not. This is included as loginstatus.lay by the class.
If the page performs a php scripting function, it is included in the main content area. This main
content area comes after the loginstatus.lay, so is evaluated afterwards.
My problem is when creating a logout page. The loginstatus is displayed as logged in, but the main
content area logouts out the user.
The reason i designed the class and page layout like this is because i wanted to seperate the design
and code as much as possible. As a temporary solution i have added some code to loginstatus.lay, but
this is edging towards including code in the layout files which i dont want.
If i havent confused you too much, is there anything else you can suggest?
you can look at the page layout at http://www.pickledshark.co.uk/EdgeDB/login.php
Thanks for reading
Carey