步骤1:进入内容模型,在“列表附加字段”表单中加入redirecturl;
步骤2:修改/include/arc.listview.class.php文件,在$row['textlink'] = "<a rel="nofollow noopener noreferrer" href=’".$row['filename']."’>".$row['title']."</a>"; 下面加上:
if(ereg(‘j’,$row['flag']))
{
$row['textlink'] = "<a rel="nofollow noopener noreferrer" href=’".$row['redirecturl']."target=_blank’>".$row['title']."</a>";
$row['arcurl'] = $row['redirecturl'];
}
步骤3:修改/include/taglib/arclist.lib.php文件,找到252行 $row['textlink'] = "<a rel="nofollow noopener noreferrer" href=’".$row['filename']."’>".$row['title']."</a>";
后面加入
if(ereg(‘j’,$row['flag']))
{
$row['textlink'] = "<a rel="nofollow noopener noreferrer" href=’".$row['redirecturl']."target=_blank’>".$row['title']."</a>";
$row['arcurl'] = $row['redirecturl'];
}
OK了,模板页面不需要修改,测试一下吧
以上就是DedeCMS V5 直接跳转网址如何解决办法。学习是为了自己的将来,努力拼搏、奋斗吧!更多关于DedeCMS V5 直接跳转网址如何解决办法请关注haodaima.com其它相关文章!