Пример #1
0
            if ($num > 0) {
                $objectList->addCustomIndex($key);
            } else {
                $key = 'title';
            }
            $indexPages[] = array('key' => $key, 'indextitle' => tr('Index (%0)', $code), 'options' => array('decorator' => 'indexrow', 'display' => 'title', 'languages' => array($code)));
        }
        $filter = array('lang' => $filterLang);
        if (isset($_GET['categId'])) {
            $access->check_feature('feature_categories');
            $filter['categId'] = $_GET['categId'];
        }
        $pages = $tikilib->list_pages(0, -1, 'pageName_asc', '', '', true, true, false, false, $filter);
        foreach ($pages['data'] as $info) {
            $objectList->add('wiki page', $info['pageName'], array('languages' => $languages));
        }
        break;
}
$objectList->finalize();
$smarty->display('header.tpl');
$smarty->display('print/print-page_header.tpl');
foreach ($indexPages as $page) {
    $smarty->assign('indextitle', $page['indextitle']);
    $smarty->display('print/print-index_header.tpl');
    $objectList->render($smarty, $page['key'], $page['options']);
    $smarty->display('print/print-index_footer.tpl');
}
// Display all data
$objectList->render($smarty, null, array('decorator' => 'indexed', 'display' => 'object', 'comments' => $_REQUEST['comments'] == 'y'));
$smarty->display('print/print-page_footer.tpl');
$smarty->display('footer.tpl');