Psuedo code 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 $smarty include("my_modules/$module.php"); // show the main smarty template $smarty->display('page_container.tpl'); ?> // and the page_container.tpl