<div class="wid"> <?php recent_posts() ?> </div>
<div class="wid"> <?php Widgets::recent_posts() ?> </div>
Harro Verton wrote on Saturday 11th of June 2011:My widgets are all produced by module controllers, which I call through a Request object. This allows you to code your widgets completely independent of your application code, making them very reusable.
<div class="wid"> <?php echo \Request::factory('module/controller/method/parm1/parm2', false)->execute()->response(); ?> </div>I've got this information in the database, for every page and every section on the page, which widgets to load. I have a single controller processing the theme template, fetching the widgets, and rendering the page. Nothing hardcoded in the templates.
<div class="wid"> <?php echo \Request::factory('module/controller/method/parm1/parm2', false)->execute()->response(); ?> </div>I've got this information in the database, for every page and every section on the page, which widgets to load. I have a single controller processing the theme template, fetching the widgets, and rendering the page. Nothing hardcoded in the templates.
It looks like you're new here. If you want to get involved, click one of these buttons!