1. 復制黃頁的模板替換掉首頁模板 也就是把 phpcms里面的lindex.html用yp里面的index.html 替換
2.打開 index.php 改為一下代碼
以下為引用的內(nèi)容: <?php require dirname(__FILE__).'/yp/include/common.inc.php'; cache_page_start(); $template = 'index'; $C = subcat('yp', 0); $lettercat = array('a'=>NULL,'b'=>NULL,'c'=>NULL,'d'=>NULL,'e'=>NULL,'f'=>NULL,'g'=>NULL,'h'=>NULL,'i'=>NULL,'j'=>NULL,'k'=>NULL,'l'=>NULL, 'm'=>NULL,'n'=>NULL,'o'=>NULL,'p'=>NULL,'q'=>NULL,'r'=>NULL,'s'=>NULL,'t'=>NULL,'u'=>NULL,'v'=>NULL,'w'=>NULL,'x'=>NULL,'y'=>NULL,'z'=>NULL,); foreach($CATEGORY as $p) { if($p['letter'] && $p['module'] == 'yp')$lettercat[$p['letter']][] = $p; } ksort($lettercat); $head['keywords'] = $M['name'].'_'.$M['seo_keywords']; $head['title'] = $M['name'].'_'.$M['seo_title'].'_'.$PHPCMS['sitename']; $head['description'] = $M['name'].'_'.$M['seo_description'].'_'.$PHPCMS['sitename']; include template('phpcms', 'index'); cache_page(intval($M['cache_index'])); ?> |
3. 更新全站緩存,好了,成功!!!