We have a set of pages with the following urls:
www.mysite.com/info/page1.html www.mysite.com/info/page2.html www.mysite.com/info/page3.html
Each has a structure as follows:
---------------------- | A | |--------------------| | | | |B | C | | | | ---------------------- | D | |--------------------| A: is the "header" area B: is a list of menu items which show a bunch of menus, sub-menus and the currently selected sub-menu C: is the content, shown depending on what is selected on B D: is a common footer to all
Our current solution is to manage everything not as html files, but as entries in a database table and to generate the html page depending on the url sought...
For example a mod_rewrite rule sends:
and that fetches the html for C from the DB table and shows the page properly.
I want to break away from this model because it is VERY slow on fetching large pages ("C").
My problems are two-fold:
- The above pages need to be shown to a "logged-in" user, in which case the header ("A") is dynamically created.
- With a view on maintainability, I DON'T want several copies of the same code (whether html or php to float around).
If I simply use pure html / js along with iframes I shouldnt have a problem displaying pages 1 to 4. However, I dont know how to manage the scenario when the user is logged in.
Can you provide more info to help us understanding the problem? Are you using a Content Management System?
no its a custom php website
Are you using frames?
actually we're not using iframes in our present setup, but am not averse to doing so if its makes sense in the ideal solution
How do you do the login now?
we have the login form on the "header section" (A) and when the user is logged in, it customizes the header.
Why is it that your current method is slower than other methods, if the content is the same?
One more perteninet fact - I currently have a php script userheader.php which generates the html for both logged-in and logged-out users (ie "A").