Exemple #1
0
}
if ($listMode == 'category') {
    $article->getArticleList();
    foreach ($article->articleList as $oneArticle) {
        $cate = $oneArticle['aCateURLName'];
        $groupedArticles[$cate][] = $oneArticle;
        $columnName[$cate] = $oneArticle['aCateDispName'];
        $columnID[$cate] = $oneArticle['aCateURLName'];
        isset($columnCount[$cate]) ? $columnCount[$cate]++ : ($columnCount[$cate] = 1);
    }
    foreach (bw::$cateList as $onecate) {
        if (isset($groupedArticles[$onecate['aCateURLName']])) {
            $returnGroupArticles[$onecate['aCateURLName']] = $groupedArticles[$onecate['aCateURLName']];
        }
    }
    $groupedArticles = $returnGroupArticles;
}
$partOut = '';
foreach ($groupedArticles as $col => $val) {
    $view->setMaster('groupcolumn');
    $view->setPassData(array('groupedArticles' => $val, 'columnName' => $columnName[$col], 'columnID' => $columnID[$col], 'columnCount' => $columnCount[$col]));
    $view->setWorkFlow(array('groupcolumn'));
    $partOut .= $view->getOutput();
    $view->resetPassData();
}
$view->setMaster('page');
$view->setPassData(array('navigation' => bw::$cateList, 'sociallink' => bw::getSocialLinks(), 'externallink' => bw::getExternalLinks(), 'tagClound' => bw::getTagCloud()));
$view->setPassData(array('listContent' => $partOut));
$view->setWorkFlow(array('page'));
$view->finalize();