<?php DashboardTools::renderSection('top'); ?> </div> <div class="layout-container" style="clear: both"> <div class="left-column-wrapper"> <div class="left-column section-left"> <?php DashboardTools::renderSection('left'); ?> </div> </div> <div class="right-column section-right"> <?php DashboardTools::renderSection('right'); ?> </div> </div> <div class="x-clear" ></div> </div> <script> $(function() { og.eventManager.fireEvent('replace all empty breadcrumb', null); }); </script>
static function renderSection($name) { $widgetsToRender = array(); self::$widgets = Widgets::instance()->findAll(array("conditions" => " plugin_id = 0 OR plugin_id IS NULL OR plugin_id IN ( SELECT id FROM " . TABLE_PREFIX . "plugins WHERE is_activated > 0 AND is_installed > 0 )", "order" => "default_order", "order_dir" => "DESC")); // If exists an instance of cw for this section, render the widgets with the options overriden foreach (self::$widgets as $w) { /* @var $w Widget */ if ($cw = ContactWidgets::instance()->findById(array('contact_id' => logged_user()->getId(), 'widget_name' => $w->getName()))) { if ($cw->getSection() == $name) { $w->setOptions($cw->getOptions()); $w->setDefaultOrder($cw->getOrder()); $widgetsToRender[] = $w; } } elseif ($w->getDefaultSection() == $name) { $widgetsToRender[] = $w; } } usort($widgetsToRender, "widget_sort"); foreach ($widgetsToRender as $k => $w) { $w->execute(); } }