Beispiel #1
0
$tmp = $params->get('module_width', 'auto');
$moduleWidth = $tmp == 'auto' ? 'auto' : (int) $tmp . 'px';
$openTarget = $params->get('open_target', 'parent');
$class = $params->get('navigator_pos', 0) ? '' : 'lof-snleft';
$itemLayout = 'item' . DS . trim($params->get('content_slider', 'image-desc')) . '.php';
$css3 = $params->get('enable_css3', '1') ? " lof-css3" : "";
$isThumb = $params->get('auto_renderthumb', 1);
/** RENDER CONTENT FOR LAYOUT **/
modLofK2News::loadMediaFiles($params, $module);
$catids = $params->get('category', '');
$catids = !is_array($catids) ? array($catids) : $catids;
$layoutModulePath = JModuleHelper::getLayoutPath($module->module);
$categoriesInfo = modLofK2News::getCategoriesInfo($catids);
foreach ($catids as $k => $id) {
    // parent category information
    if (isset($categoriesInfo[$id])) {
        $categoryInfo = $categoriesInfo[$id];
        $themeBox = array_key_exists($k, $themesSetting) ? "lof-" . $themesSetting[$k] : "";
        $categories = modLofK2News::getListCategories((int) $id);
        $showCategories = true;
        if ($maxCatsShowed <= 0 || count($categories['ids']) <= 1) {
            $showCategories = false;
        }
        $items = modLofK2News::getList($params, $categories['ids'], $totalItems);
        unset($categories['ids']);
        $leading = array_slice($items, 0, $leadingCount);
        $primary = array_slice($items, $leadingCount, $primaryCount);
        $secondary = array_slice($items, $leadingCount + $primaryCount, $secondaryCount);
        require $layoutModulePath;
    }
}