织梦dedecms修改文章标题长度的方法

默认的dedecms文章标题的长度为60字符,而现在文章标题20个汉字是远远不能满足需要的,所以我们要做的就是修改系统默认的字数限制。方法如下:
  1、修改织梦后台“系统->系统基本参数->其它选项->文章标题长度”为想要的长度,例如200(最大值不能超过255),点击确定保存
  2、在织梦后台“系统->SQL命令行工具”执行SQL语句:

alter table dede_archives change title title varchar(250)

备注:其中dede_为默认的安装数据库的前缀,如果安装dedecms时修改,现在也要做相应的修改。

例如:页面

http://www.sdfymb.com/news/711.html

文章标题为:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>建筑圆柱木模板支设与拆除时注意事项及木制圆模板的优势-方圆模板</title>
<meta name="keywords" content="建筑圆柱木模板" />
<meta name="description" content="现在圆形混凝土柱子支模施工基本上采用建筑圆柱木模板,那么采用这种木制圆模板有哪些优势呢?在支模施工或者脱模建筑圆柱模板时需要注意哪些方面呢?" />
<link rel="canonical" href="http://www.sdfymb.com/news/711.html" />
<script src="http://msite.baidu.com/sdk/c.js?appid=1634404368209099"></script>
<script type="application/ld+json">
    {
        "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
        "@id": "http://www.sdfymb.com/news/711.html",
        "appid": "1634404368209099",
        "title": "建筑圆柱木模板支设与拆除时注意事项及木制圆模板的优势-方圆模板",
        "images": ["http://www.sdfymb.com/uploads/image/2019/1-1911130Z614Y8.jpg","http://www.sdfymb.com/uploads/image/2019/1-1911130ZH0422.jpg","http://www.sdfymb.com/uploads/image/2019/1-1911130ZQD06.jpg"],
        "pubDate": "2019-11-13T08:50:55"
    }
</script>
<link href="/skin/css/style.css" rel="stylesheet" type="text/css" />
</head>

完全超出60个字符的限制。

猜你喜欢

转载自blog.51cto.com/14201330/2450202