<?php if (MPage::IsDefined("stylesheet")) { echo MPage::PlaceHolder("stylesheet"); } if (MPage::IsDefined("scripts")) { echo MPage::PlaceHolder("scripts"); } ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <?php include "inc/header.php"; ?> <?php include "inc/topmenu.php"; ?> <div id="dash"> <?php if (MPage::IsDefined("body")) { echo MPage::PlaceHolder("body"); } ?> </div> <?php include "inc/footer.php"; ?> </div> </body> </html>
<body> This is some ASP-like master page. You just have to define where you wanna put the pieces of your site and the MPage class does the rest. <div id="menu"> <?php echo MPage::PlaceHolder("menuitems"); ?> </div> <?php echo MPage::PlaceHolder("body"); ?> <hr /> <?php echo MPage::PlaceHolder("copyright"); ?> <hr /> <!-- Here goes the partial render of div.php --> <?php MPage::Render("div.php"); ?> </body> </html>