ECSHOP首页如何调用所有标签? 标签云效果
2012-05-22 11:13
525 查看
首先,让我们来打开 /index.php 文件
找到
在它下边增加PHP代码
$sql=‘select tag_id,user_id,tag_words,count(tag_id) as tag_count’.
'from'.$globals[''ecs]->table['tag'.]"group by tag_words";
$tag_list=$globals['db']->getall($sql);
if(!empty($tag_lset))
{
inlude_once(root_path. 'includes/lib_clips.php');
color_tag($tag_list);
} $smarty->assign('tag_list',$tag_list); //标签云
然后,我们再打开 模板文件 /themes/default/index.dwt
鼠标定位到你想显示标签云的地方,加入下面代码
最后,到后台更新下缓存,就可以了。
找到
$smarty->assign('shop_notice', $_CFG['shop_notice']); // 商店公告 |
$sql=‘select tag_id,user_id,tag_words,count(tag_id) as tag_count’.
'from'.$globals[''ecs]->table['tag'.]"group by tag_words";
$tag_list=$globals['db']->getall($sql);
if(!empty($tag_lset))
{
inlude_once(root_path. 'includes/lib_clips.php');
color_tag($tag_list);
} $smarty->assign('tag_list',$tag_list); //标签云
然后,我们再打开 模板文件 /themes/default/index.dwt
鼠标定位到你想显示标签云的地方,加入下面代码
<!--标签云--> <div class="box"> <div class="box_1"> <h3><span><a href="/exchange.php" class="f6">标签云</a></span></h3> <div class="centerPadd"> <div class="clearfix goodsBox" style="border:none;"> <!-- {if $tag_list} --> <!-- 标签云开始 {foreach from=$tag_list item=tag}--> <span style="font-size:{$tag.size}; line-height:36px;"> | <a href="{$tag.url}" style="text-decoration:none;color:{$tag.color}"> {if $tag.bold} <b>{$tag.tag_words|escape:html}</b> {else} {$tag.tag_words|escape:html} {/if} </a> </span> <!-- 标签云结束 {/foreach}--> <!-- {else} --> <span style="margin:2px 10px; font-size:14px; line-height:36px;">{$lang.no_tag}</span> <!-- {/if} --> <div class="more"><a href="/tag_cloud.php"><img src="images/more.gif" /></a></div> </div> </div> </div> </div> <div class="blank5"></div> |
相关文章推荐
- 如何在Ecshop首页调用积分商城里的商品
- ecshop首页如何在后台调用某…
- Ecshop如何在首页调用指定栏目的商品
- dede首页如何调用单页文档内容标签
- ecshop首页如何在后台调用某分类下的商品
- ecshop 首页如何调用积分商城里面的的商品
- ecshop如何让所有页面都显视最能文章以提高SEO优化效果
- ecshop首页调用指定分类的所有产品(指定一级调二级)
- [原创]JEECMS 自定义标签调用广告版位下的所有广告(利用广告管理管理首页幻灯片)
- DEDECMS模板如何调用arclist标签实现首页分页
- 如何在ecshop首页调用指定分类的热销、推荐、新
- ecshop 如何首页调用显示一定条数的用户评论
- jQuery如何获取同一个类标签的所有值(默认无法获取)
- ecshop调用指定分类(包含子分类)下所有产品的评论信息
- 如何在dede首页和栏目列表页调用自定义字段
- 【转】Eclipse中如何查找所有调用方法a()的类
- dedecms织梦首页如何调用文章列表?
- 非常实用的织梦dede所有标签调用方法大全
- 如何在zencart里实现多标签标签云效果
- php调用com组件,如何能查看到它的所有方法和属性