ecshop {$keywords} keywords
发布日期:2020-08-18摘要:ecshop里面我想每个商品分类页面添加不同的Keywords和Description 在category php 已经有了的$smarty->assign( keywords , htmlspe...
ecshop里面我想每个商品分类页面添加不同的Keywords和Description...
在category.php 已经有了的$smarty->assign("keywords", htmlspecialchars($cat["keywords"]));$smarty->assign("description", htmlspecialchars($cat["cat_desc"]));$smarty->assign("cat_style", htmlspecialchars($cat["style"]));categoty.dwt 只要在后台分类添加相应的关键词和描述就行了,分类页面有缓存的,你可以清除下缓存 看看!
你的那个ECSHOP商品搜索标题修改是怎么改的
是这样的 你需要了解一下 ecshop里面调用的文件 比如你的图片里面显示的你需要 这样调用就可以显示分类了 但是你自己做的模板文件里面需要有category_tree.lbi 这个基础模板文件 我一般都是直接复制默认模板里面的这个文件过来 然后自己去修改样式就可以了 不需要去了解怎么直接调用数据库 ecshop这些都封装在底层 新手不好搞
谁会ecshop,讲讲这句话具体啥意思 $price = empty($goods
assign_ur_here在lib_main.php的129行,详细内函数容如下:/** * 取得当前位置和页面标题 * * @access public * @param integer $cat 分类编号(只有商品及分类、文章及分类用到) * @param string $str 商品名、文章标题或其他附加的内容(无链接) * @return array */ function assign_ur_here($cat = 0, $str = "") { /* 判断是否重写,取得文件名 */ $cur_url = basename(PHP_SELF); if (intval($GLOBALS["_CFG"]["rewrite"])) { $filename = strpos($cur_url,"-") ? substr($cur_url, 0, strpos($cur_url,"-")) : substr($cur_url, 0, -4); } else { $filename = substr($cur_url, 0, -4); } /* 初始化“页面标题”和“当前位置” */ $page_title = $GLOBALS["_CFG"]["shop_title"] . " - " . "Powered by ECShop"; $ur_here = "" . $GLOBALS["_LANG"]["home"] . ""; /* 根据文件名分别处理中间的部分 */ if ($filename != "index") { /* 处理有分类的 */ if (in_array($filename, array("category", "goods", "article_cat", "article", "brand"))) { /* 商品分类或商品 */ if ("category" == $filename || "goods" == $filename || "brand" == $filename) { if ($cat > 0) { $cat_arr = get_parent_cats($cat); $key = "cid"; $type = "category"; } else { $cat_arr = array(); } } /* 文章分类或文章 */ elseif ("article_cat" == $filename || "article" == $filename) { if ($cat > 0) { $cat_arr = get_article_parent_cats($cat); $key = "acid"; $type = "article_cat"; } else { $cat_arr = array(); } } /* 循环分类 */ if (!empty($cat_arr)) { krsort($cat_arr); foreach ($cat_arr AS $val) { $page_title = htmlspecialchars($val["cat_name"]) . "_" . $page_title; $args = array($key => $val["cat_id"]); $ur_here .= " > " . htmlspecialchars($val["cat_name"]) . ""; } } } /* 处理无分类的 */ else { /* 团购 */ if ("group_buy" == $filename) { $page_title = $GLOBALS["_LANG"]["group_buy_goods"] . "_" . $page_title; $args = array("gbid" => "0"); $ur_here .= " > " . $GLOBALS["_LANG"]["group_buy_goods"] . ""; } /* 拍卖 */ elseif ("auction" == $filename) { $page_title = $GLOBALS["_LANG"]["auction"] . "_" . $page_title; $args = array("auid" => "0"); $ur_here .= " > " . $GLOBALS["_LANG"]["auction"] . ""; } /* 夺宝 */ elseif ("snatch" == $filename) { $page_title = $GLOBALS["_LANG"]["snatch"] . "_" . $page_title; $args = array("id" => "0"); $ur_here .= " > " . $GLOBALS["_LANG"]["snatch_list"] . ""; } /* 批发 */ elseif ("wholesale" == $filename) { $page_title = $GLOBALS["_LANG"]["wholesale"] . "_" . $page_title; $args = array("wsid" => "0"); $ur_here .= " > " . $GLOBALS["_LANG"]["wholesale"] . ""; } /* 积分兑换 */ elseif ("exchange" == $filename) { $page_title = $GLOBALS["_LANG"]["exchange"] . "_" . $page_title; $args = array("wsid" => "0"); $ur_here .= " > " . $GLOBALS["_LANG"]["exchange"] . ""; } /* 其他的在这里补充 */ } } /* 处理最后一部分 */ if (!empty($str)) { $page_title = $str . "_" . $page_title; $ur_here .= " > " . $str; } /* 返回值 */ return array("title" => $page_title, "ur_here" => $ur_here); }
-
给我们打电话
7*24小时服务热线:1399999999
全国客服热线:400-0000-000 -
百度地图
福建省漳州市 -
给我们发邮件
E-mail:[email protected]
在线沟通