/** * sattic category list */ function staticCategoryJs() { $category_list = $this->getAll(); // 静态化文章 $data = array('category_list' => $category_list); staticTemplate($GLOBALS['config']['category']['js_template'], $GLOBALS['config']['category']['dir'] . 'category.js', $data); }
/** * 静态化文章详情页 */ function staticArticle($id) { $data = $this->findById($id); if ($data) { staticTemplate($GLOBALS['config']['article']['detail_template'], $GLOBALS['config']['article']['dir'] . $id . '.html', $data); } }