Psuedo code<?php// set up the $module which defaults to 'index'$module = isset($_GET['module']) ? $_GET['module'] : 'index';$smarty->assign('mid_module',$module);// include the "module" file, eg contacts, which contains the business logic// eg databases queries.. and code to assign() the vars to $smartyinclude("my_modules/$module.php");// show the main smarty template$smarty->display('page_container.tpl');?>// and the page_container.tpl<body> <div id="content"> {* the header block is included *} {include file='page_header.tpl'} {* include the module template *} {include file="$mid_module.tpl"} <!--- page footer--> </div></body>