DedeCMS V5 直接跳转网址解决办法

时间:2014-08-07

 

步骤1:进入内容模型,在列表附加字段表单中加入redirecturl
步骤2:修改/include/arc.listview.class.php文件,在$row['textlink'] = "<a href=’".$row['filename']."’>".$row['title']."</a>"; 下面加上:

if(ereg(‘j’,$row['flag']))
                        {
                         $row['textlink'] = "<a href=’".$row['redirecturl']."target=_blank’>".$row['title']."</a>";
                         $row['arcurl'] = $row['redirecturl'];                          
                        }

步骤3:修改/include/taglib/arclist.lib.php文件,找到252 $row['textlink'] = "<a href=’".$row['filename']."’>".$row['title']."</a>";
后面加入

if(ereg(‘j’,$row['flag']))
                        {
                         $row['textlink'] = "<a href=’".$row['redirecturl']."target=_blank’>".$row['title']."</a>";
                         $row['arcurl'] = $row['redirecturl'];                              
                        }

OK了,模板页面不需要修改,测试一下吧

上一条:DEDE V5常用的统计SQL标签 下一条:dedecms专题分节点自由单独调用的实现方法

相关文章

最新文章