共享一个帮助中心代码,喜欢拿去
EC的帮助中心网站底部,点击打开后只当文章看,没有专门的帮助中心,这样显示不专业,也不美观,我稍微改了一下,做了个帮助中心栏目,不知道大家喜不喜欢,喜欢的就自己动手改一下,我发个代码给大家,适用于EC2.51 joyo模版1、建新一个help2.lbi,内容以下[code]<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="title-01">
<!--{if $helps}-->
<div class="title-01-title">帮助中心</div>
</div>
<div id="help-tree">
<!-- {foreach from=$helps item=help_cat} -->
<h3><span>{$help_cat.cat_name}</span></h3>
<div class="yiji"></div>
<ul class="erji">
<!-- {foreach from=$help_cat.article item=item} -->
<li><a href="{$item.url}" title="{$item.title|escape:html}">{$item.short_title}</a></li>
<!-- {/foreach} -->
</ul>
<!-- {/foreach} -->
</div>
<!--{/if}-->[/code]2、在article.dwt里约第90行[code]<!-- #BeginLibraryItem "/Library/category_tree.lbi" -->[/code]改为[code]<!-- #BeginLibraryItem "/Library/help2.lbi" -->[/code]3、在style.css里的[code]#category-tree .erji li {
padding-left:30px;
padding-top:2px;
padding-bottom:3px;
border-bottom:1px #F3F6EB solid;
margin-bottom:3px;
background-image:url(images/erji.gif);
background-repeat: no-repeat;
background-position: 15px 4px;
}[/code]下面增加[code]#help-tree {
width:175px;
border-left:1px #6CB8C5 solid;
border-right:1px #6CB8C5 solid;
border-bottom:1px #6cb8c5 solid;
background-color:#fff;
margin-bottom:8px;
}
#help-tree ul {
list-style-type:none;
}
#help-tree h3 {
padding:6px 0 5px 27px;
margin-bottom:3px;
border-bottom:1px #E9ECE0 solid;
border-top:1px #E9ECE0 solid;
background-color:#F3F6EB;
background-image: url(images/menu_minus.gif);
background-repeat: no-repeat;
background-position: 12px center;
}
#help-tree .yiji {
float:right;
margin:-22px 10px 0 0;
width:20px;
height:20px;
background: url() no-repeat right top;
cursor:n-resize;
}
#help-tree .yiji2 {
float:right;
margin:-22px 10px 0 0;
width:40px;
height:20px;
background: url(images/menu_minus.gif) no-repeat right top;
cursor:hand;
}
#help-tree .erji li {
padding-left:30px;
padding-top:2px;
padding-bottom:3px;
border-bottom:1px #F3F6EB solid;
margin-bottom:3px;
background-image:url(images/erji.gif);
background-repeat: no-repeat;
background-position: 15px 4px;
}[/code]
效果看看图片
代码我自己用了好长时间都没问题,不知道对不对,喜欢就顶一下,不喜欢的不要说我:loveliness: ,有什么地方不对的,请告诉我,谢谢
[[i] 本帖最后由 cnave 于 2008-8-3 17:13 编辑 [/i]] 很好 很强大 非常好
希望官方关注加进下个版本中 非常好,官方的确要改进啊。 沙发!!!!!!!!!! 2.60 utf8行不行?
回复 #6 Bajunma 的帖子
自己对应好加进去,应该没问题,自己试试!我没用过2.6 不错,非常非常的好. gbk的心行不?? 既然只有这一个地方使用到,没必要再加一个help2.lbi。 [quote]原帖由 [i]roovy[/i] 于 2008-8-8 06:40 发表 [url=http://bbs.ecshop.com/redirect.php?goto=findpost&pid=227854&ptid=60849][img]http://bbs.ecshop.com/images/common/back.gif[/img][/url]既然只有这一个地方使用到,没必要再加一个help2.lbi。 [/quote]
help2.lbi与help.lbi的格式是不一样的,help2.lbi帮助中心的分类是在左面,而help.lbi是在底部,两种格式是完全不一样的,如果你不加help2.lbi的而是直接修改help.lbi使用的,那你底部显示的帮助中心内容就不能再使用 感谢楼主的分享。 我用的是2.6 默认模板不知如何修改,楼主能否赐教?
页:
[1]
