织梦导航循环指定栏目出现 rel="nofollow"的方法

  织梦导航循环指定栏目出现 rel="nofollow"代码如下

  {dede:channel type=’top’ row=’8′}

  [field:typename/]

  {/dede:channel}

  代码说明

  if(@me == 9){ @me = ‘rel=”nofollow”)

  //如果id等于9就会输出rel=”nofollow”

  // 如果想让指定id输出rel=”nofollow” 就是添加,反之就不添加

  另外一种,使用方法就是使用织梦自定义函数,写在include/extend.func.php里

  function is_nofollow($id){

  switch ($id) {

  case ‘1’:

  $nofollow = ‘rel=”nofollow”‘;

  break;

  case ‘2’:

  $nofollow = ‘rel=”nofollow”‘;

  break;

  case ‘3’:

  $nofollow = ‘rel=”nofollow”‘;

  break;

  case ‘4’:

  $nofollow = ‘rel=”nofollow”‘;

  break;

  default:

  $nofollow = ”;

  break;

  }

  return $nofollow;

  }

  织梦调用方法如下

  {dede:channel type=’top’ row=’8′} [field:typename/] {/dede:channel}

☉免责声明:本站所有模板均来自用户分享和网络收集,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服,我们核实后会立即删除。
☉本站提供的源码、模板、软件工具等其他资源,都不包含技术服务,请大家谅解!
pbootcms模板网 » 织梦导航循环指定栏目出现 rel="nofollow"的方法

Pbootcms模板网 提供优质的模板集合

立即查看 了解详情