// to get an idea (simplified!) \Theme::setup('themename'); // themename is the name of the theme module, from the site config \Theme::template('homepage'); // page template to use, from the site or page config // generate widget data from whatever code you all. In my case, 'data' can be a string, a view object, a // viewmodel object, or a request object (depending on what's defined in my page definition table) \Theme::widget('header', 'data'); \Theme::widget('sidebar', 'data'); \Theme::widget('content', 'data'); \Theme::widget('footer', 'data'); \Theme::render(); // output the page using the template and the stored widgetsA page template then looks like this (extremely simplified):
<html> <head> <!-- something here --> </head> <body> <div id="header"> <?php echo $header; ?> </div> <div id="body"> <div id="sidebar"> <?php echo $sidebar; ?> </div> <div id="content"> <?php echo $content; ?> </div> </div> <div id="footer"> <?php echo $footer; ?> </div> </body> </html>
It looks like you're new here. If you want to get involved, click one of these buttons!