I have a jqtouch website depending on if someone is logged in or not the pages change. At the moment I have a pretty ugly solution….
function page1()
{
$page1 = '<div>.........</div>';
return $page1;
}
function page2()
{
$page2 = '<div>.........</div>';
return $page2;
}
function page3()
{
$page3 = '<div>.........</div>';
return page3();
}
etc….
to load the page I do the following
echo page1() . page2() . page3();
or
echo page1() . page3();
Depending on what the user state is.
I need to mix and match pages so I have all the pages in one main page and only really want to run the sql withing those pages should they be needed.
effectively I have a stack of cards and I want to put them together in various ways with out disturbing the unrequired ones.
How would you assemble the pages?
Use templates:
In
page1.phpIn
page2.phpIn
common.phpIn
common2.phpThen in your
gatewaypage you do this: