当前位置: 首页 > ECshop经验共享 > ecshop内页关键词的实现
ecshop内页关键词的实现
复制代码
-
-
-
- ecshop内页关键词的实现如:search.php?intro=best,flow.php,message.php的改进
- 打开includes/lib_main.php
- 找到函数:function assign_ur_here($cat = 0, $str = '')
- elseif ('exchange' == $filename)
- {
- $page_title = $GLOBALS['_LANG']['exchange'] . '_' . $page_title;
- $args = array('wsid' => '0');
- $ur_here .= ' <code>></code> <a href="exchange.php">' .
- $GLOBALS['_LANG']['exchange'] . '</a>';
- }
-
-
- elseif ('search' == $filename)
- {
- $action = unserialize(base64_decode(trim($_GET['encode'])));
- $action = $action['intro'];
- if($action == 'best[L]'){
- $keywords = " ";
- $description = " ";
- }
- }
- elseif ('flow' == $filename)
- {
- $keywords = "flow";
- $description = "flow";
- }
- elseif ('message' == $filename)
- {
- $keywords = "message";
- $description = "message";
- }
-
-
- return array('title' => $page_title, 'ur_here' => $ur_here,
- 'keywords'=> $keywords,'description' => $description);
-
-
- 基本上的功能已经实现,你可以在需要参数的代码中增加:
- $smarty->assign('keywords',$position['keywords']);
- $smarty->assign('description',$position['description']);