我想把默认模板的商品分类变成这样?怎么修改?
2016-07-07 16:37 来源:www.chinab4c.com 作者:ecshop专家
我想把默认模板的商品分类变成这样?怎么修改?让他2级分类,每个分类都占一行,不管分类名称长短。 <ul> <!--{foreach from=$categories item=cat}--> <li> <span class="parent-cat"><A href="{$cat.url}">{$cat.name|escape:html}</A></span><br /> <!--{foreach from=$cat.children item=child}--> <span style="white-space:nowrap;"><A href="{$child.url}">{$child.name|escape:html}</A></span> <!--{/foreach}--> </li> <!--{/foreach}--> </ul> 这是默认的代码 |
回答:
然后把样式表和图片也搞过来不就OK了 |
这样的也可以呀??? 去试一下.. |
帮忙解决一下 |
这样就可以了: 一:分类代码 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <div class="title-01"> <div class="title-01-title">商品分类</div> </div> <div id="category-tree"> <!--{foreach from=$categories item=cat}--> <h3><a href="{$cat.url}">{$cat.name|escape:html}</a></h3> <div class="yiji"></div> <ul class="erji"> <!--{foreach from=$cat.children item=child}--> <li><a href="{$child.url}">{$child.name|escape:html}</a></li> <!--{/foreach}--> </ul> <!-- {/foreach}--> </div> |
再接上: fx.Text = Class.create(); fx.Text.prototype = Object.extend(new fx.Base(), { initialize: function(el, options) { this.el = $(el); this.setOptions(options); if (!this.options.unit) this.options.unit = "em"; }, increase: function() { this.el.style.fontSize = this.now + this.options.unit; } }); fx.Combo = Class.create(); fx.Combo.prototype = { setOptions: function(options) { this.options = { opacity: true, height: true, width: false } Object.extend(this.options, options || {}); }, initialize: function(el, options) { this.el = $(el); this.setOptions(options); if (this.options.opacity) { this.o = new fx.Opacity(el, options); options.onComplete = null; } if (this.options.height) { this.h = new fx.Height(el, options); options.onComplete = null; } if (this.options.width) this.w = new fx.Width(el, options); }, toggle: function() { this.checkExec('toggle'); }, hide: function(){ this.checkExec('hide'); }, clearTimer: function(){ this.checkExec('clearTimer'); }, checkExec: function(func){ if (this.o) this.o[func](); if (this.h) this.h[func](); if (this.w) this.w[func](); }, resizeTo: function(hto, wto) { if (this.h && this.w) { this.h.custom(this.el.offsetHeight, this.el.offsetHeight + hto); this.w.custom(this.el.offsetWidth, this.el.offsetWidth + wto); } }, customSize: function(hto, wto) { if (this.h && this.w) { this.h.custom(this.el.offsetHeight, hto); this.w.custom(this.el.offsetWidth, wto); } } } fx.Accordion = Class.create(); fx.Accordion.prototype = { setOptions: function(options) { this.options = { delay: 100, opacity: false } Object.extend(this.options, options || {}); }, initialize: function(yijis, elements, options) { this.elements = elements; this.setOptions(options); var options = options || ''; this.fxa = []; if (options && options.onComplete) options.onFinish = options.onComplete; elements.each(function(el, i){ options.onComplete = function(){ if (el.offsetHeight > 0) el.style.height = '1%'; if (options.onFinish) options.onFinish(el); } this.fxa = new fx.Combo(el, options); this.fxa.hide(); }.bind(this)); yijis.each(function(tog, i){ if (typeof tog.onclick == 'function') var exClick = tog.onclick; tog.onclick = function(){ if (exClick) exClick(); this.showThisHideOpen(elements); }.bind(this); }.bind(this)); }, showThisHideOpen: function(toShow){ this.elements.each(function(el, j){ if (el.offsetHeight > 0 && el != toShow) this.clearAndToggle(el, j); if (el == toShow && toShow.offsetHeight == 0) setTimeout(function(){this.clearAndToggle(toShow, j);}.bind(this), this.options.delay); }.bind(this)); }, clearAndToggle: function(el, i){ this.fxa.clearTimer(); this.fxa.toggle(); } } var Remember = new Object(); Remember = function(){}; Remember.prototype = { initialize: function(el, options){ this.el = $(el); this.days = 365; this.options = options; this.effect(); var cookie = this.readCookie(); if (cookie) { this.fx.now = cookie; this.fx.increase(); } }, setCookie: function(value) { var date = new Date(); date.setTime(date.getTime()+(this.days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); document.cookie = this.el+this.el.id+this.prefix+"="+value+expires+"; path=/"; }, readCookie: function() { var nameEQ = this.el+this.el.id+this.prefix + "="; var ca = document.cookie.split(';'); for(var i=0;c=ca;i++) { while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return false; }, custom: function(from, to){ if (this.fx.now != to) { this.setCookie(to); this.fx.custom(from, to); } } } fx.RememberHeight = Class.create(); fx.RememberHeight.prototype = Object.extend(new Remember(), { effect: function(){ this.fx = new fx.Height(this.el, this.options); this.prefix = 'height'; }, toggle: function(){ if (this.el.offsetHeight == 0) this.setCookie(this.el.scrollHeight); else this.setCookie(0); this.fx.toggle(); }, resize: function(to){ this.setCookie(this.el.offsetHeight+to); this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+to); }, hide: function(){ if (!this.readCookie()) { this.fx.hide(); } } }); |
十分感谢楼上的帅哥! |
最近更新
常用插件
- ecshop注册审核插件
ecshop插件介绍:ecshop会员注册审核插件,主要是在前台提供给注册的时候...
- ecshop虚拟发货插件
ecshop虚拟发货插件介绍: ecshop虚拟发货插件,主要为了通过后台手动录...
- ecshop订单聚合插件
ecshop订单聚合插件,主要是为了方便ecshop中订单产品到货情况的分析和...
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
- ecshop的oss插件
ecshop的oss插件免费共享了,oss,ecshoposs...
ecshop热门问答
ecshop热门资料
ecshop新闻
ecshopMSN
ecshop栖霞区
ecshop添加好友
ecshop邮政
ecshop任然
ecshop显示重量
ecshop后台正常
ecshop限时
ecshop高亮菜单
ecshop所有分类
ecshop日期
ecshop扩展名
后台文章
ecshop大小
ecshop不能不
ecshop结算中心小数
ecshop配送方式名称
ecshop页脚居中
ecshopsitemaps
ecshop留言板验证功能
b4cseo
ecshop热卖商品
ecshop绿意
ecshop清空
ecshop发货确认接口
ecshop天空
调用标签
ecshop欢迎
ecshop上图