Warning: Undefined array key "night" in /www/wwwroot/dhaomu.com/wp-content/themes/b2/header.php on line 18

在EcShop文章列表页显示内容摘要

ecshop教程:在Ecshop文章列表页显示内容摘要!本教程中讲到的“内容摘要”指的是文章内容的前 60个字符(当然也可以是前40个,前50个等等)

ecshop教程:在Ecshop文章列表页显示内容摘要!本教程中讲到的“内容摘要”指的是文章内容的前 60个字符(当然也可以是前40个,前50个等等)

下面以 2.7.2版 + 官方默认模板 为例进行讲解:

1、修改 includes/lib_article.php 文件

搜索

$sql = 'SELECT article_id, title, author, add_time, file_url, open_type' .

一共能搜到两处,每一处都改为

$sql = 'SELECT article_id, title,content, author, add_time, file_url, open_type' .

继续找到

$arr[$article_id]['title']       = $row['title'];

在它下面增加一行代码

$arr[$article_id]['content']       = strip_tags($row['content']);

2、打开 模板文件 /themes/default/article_cat.dwt

搜索找到

{$article.short_title}</a>

在它后边增加代码

<br>{$article.content|truncate:60}
温馨提示:
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明

给TA赞赏
共{{data.count}}人
人已赞赏
编程技巧

织梦{dede:channelartlist}标签栏目循环序号调用方法

2022-6-2 0:00:00

编程技巧

EcShop如何去掉首页的商店公告

2022-6-4 0:00:00

0 条回复 A文章作者 M管理员

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914
----《》
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索