[Phpwm] Site Structure

David Goodwin david at codepoets.co.uk
Fri Dec 9 21:43:33 GMT 2005


Joe Beard wrote :
>  My current site has just one skin.php file which contains header,
> footer and body functions, which I can then supply content to, or
> alter to become page specific, so a general file takes on the form:
> 
> include("/functions/skin.php");
> page_header();
> page_body_title("This is a Page");
> page_body_content("Some content here");
> page_footer();
> 
> but this means I can then call the functions for different purposes,
> for example 90% of my site doesn't use frames, but I have a cgiirc
> forum, so that page has frames that contain the page_header() function
> with arguments to return just the side bar for example.

I used nearly exactly the same with a previous employer's website; 
although I defined e.g. $title before calling page_header() (perhaps I
should have passed $title as an argument in instead?) to provide custom
titles etc for pages.

I found it worked quite well, at least from a code reuse point of
view....

David.

-- 
David Goodwin 

[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk       ]



More information about the Phpwm mailing list