首页 >

织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target

大伙应该都知道rel=’nofllow’的作用,它是告诉搜索引擎,不要将该链接计入权重。

织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target

因此多数情况下,可以将一些不想传递权重的链接进行nofllow处理;

例如一些非本站的链接,不想传递权重,但是又需要加在页面中的,

像 外部链接 | 统计代码 | 备案号链接 | 供用户查询的链接等等。

为了方便管理,直接在织梦后台栏目里自由把控每个栏目对应的链接属性,

来给织梦栏目增加链接属性rel=”nofllow” rel=”external” rel=”external nofollow”和新窗口target=”_blank”

  • rel=”nofllow” (告诉搜索引擎该链接不计入权重)
  • rel=”external” (告诉搜索引擎该链接不是本站链接)
  • rel=”external nofollow” (告诉搜索引擎该链接不是本站链接也不计入权重)

织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target实现教程

1 | 后台-系统-SQL工具,执行

ALTER TABLE `dede_arctype` ADD `nofollow` CHAR( 60 ) NOT NULL DEFAULT '';ALTER TABLE `dede_arctype` ADD `target` CHAR( 60 ) NOT NULL DEFAULT '';

2 | 打开 /dede/catalog_add.php 找到,大概在 239 行左右

UpDateCatCache();

在它的 上面 加入

$id = $dsql->GetLastID();$upquery = "UPDATE `dede_arctype` SET `nofollow`='$nofollow',`target`='$target' WHERE id='$id' ";$dsql->ExecuteNoneQuery($upquery);

3 | 打开 /dede/catalog_edit.php 找到,大概在 106 行左右

UpDateCatCache();

在它的 上面 加入

$upquery = "UPDATE `dede_arctype` SET `nofollow`='$nofollow',`target`='$target' WHERE id='$id' ";$dsql->ExecuteNoneQuery($upquery);

4 | 打开 /dede/templets/catalog_add.htm 找到

栏目属性

在它上面一行的上面加入

    链接属性rel:                        请选择属性            external            nofollow            external nofollow                        新窗口打开    

如图

织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target


织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target
  • 织梦DedeCMS报错Fatal error: Call to undefined function ParCv()
  • 织梦DedeCMS报错Fatal error: Call to undefined function ParCv() | 织梦DedeCMS报错Fatal error: Call to undefined function ParCv() ...

    织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target
  • 织梦DedeCMS模板织梦DedeCMS:arclist 标签排序具体实现的方法
  • 织梦DedeCMS模板织梦DedeCMS:arclist 标签排序具体实现的方法 | 织梦DedeCMS模板织梦DedeCMS:arclist 标签排序具体实现的方法 ...

    织梦DedeCMS栏目属性增加链接rel、nofollow和新窗口target
  • 织梦DedeCMS文章模板中相关文章调用标签代码
  • 织梦DedeCMS文章模板中相关文章调用标签代码 | 织梦DedeCMS文章模板中相关文章调用标签代码 ...