分类分类
更新时间:2026-02-18 20:42:31作者:fang
经常看到有人问,如何把ECSHOP标签云调用到首页呢,现在就来说一下相关的修改教程。
老规矩,还是以官方默认模板为例。
首先,让我们来打开/index.php文件
找到
$smarty->assign('shop_notice',$_CFG['shop_notice']);//商店公告
在它下边增加PHP代码
$sql=‘selecttag_id,user_id,tag_words,count(tag_id)astag_count’.
'from'.$globals[''ecs]->table['tag'.]"groupbytag_words";
$tag_list=$globals['db']->getall($sql);
if(!empt
y($tag_lset))
{
inlude_once(root_path.'includes/lib_clips.php');
color_tag($tag_list);
}$smarty->assign('tag_list',$tag_list);//标签云
然后,我们再打开模板文件/themes/default/index.dwt
鼠标定位到你想显示标签云的地方,加入下面代码
<!--标签云-->
<divclass="box">
<divclass="box_1">
<h3><span><ahref="/exchange.php"class="f6">标签云</a></span></h3>
<divclass="centerPadd">
<divclass="clearfixgoodsBox"style="border:none;">
<!--{if$tag_list}-->
<!--标签云开始{foreachfrom=$tag_listitem=tag}-->
<spanstyle="font-size:{$tag.size};line-height:36px;">|<ahref="{$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}-->
<spanstyle="margin:2px10px;font-size:14px;line-height:36px;">{$lang.no_tag}</span>
<!--{/if}-->
<divclass="more"><ahref="/tag_cloud.php"><imgsrc="images/more.gif"/></a></div>
</div>
</div>
</div>
</div>
<divclass="blank5"></div>
最后,到后台更新下缓存,就可以了。
相关
归墟战纪策略游戏262.92 MBv3.95802026-02-14
下载爆裂老奶策略游戏209.43 MBv1.0.112026-02-14
下载超能下蛋鸭策略游戏395.4 MBv1.2.82026-02-14
下载你好盒子实用工具12.1 MBv2.2.852026-02-14
下载我在峡谷当牛马休闲益智87.95 MBv0.7.12026-02-14
下载抽卡监狱2策略游戏190.75 MBv1.4.92026-02-14
下载Campus社交通讯94.36 MBv1.19.02026-02-14
下载冒险传奇角色扮演141.73 Mv9991.12026-02-14
下载心动次元app社交通讯43.96 Mv1.0.1.32026-02-14
下载致亲爱的我角色扮演1.63Gv1.02026-02-14
下载狼伴侣游戏手机版冒险游戏155.6 Mv1.02026-02-14
下载Loclike社交通讯169.08 Mv2.2.112026-02-14
下载










