在用织梦dedecms最新版做手机站模板的朋友都知道,织梦dedecms默认手机端网站如果用pc站的调用方式调用上一篇和下一篇,出现的网址是错误的。下面跟版网的小编为您提供解决方法,希望对您有帮助。
打开 \include\arc.archives.class.php 文件
首先查找:
1 |
$this->PreNext[ 'pre' ] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> " ; |
|
在这段代码后面增加:
1 |
$this->PreNext[ 'prem' ] = "上一篇:<a href='view.php?aid={$preRow['id']}'>{$preRow['title']}</a> " ; |
|
继续查找:
1 |
$this->PreNext[ 'next' ] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> " ; |
|
在这段代码后面增加:
1 |
$this->PreNext[ 'nextm' ] = "下一篇:<a href='view.php?aid={$preRow['id']}'>{$nextRow['title']}</a> " ; |
|
继续往下查找:
1 |
else if ($gtype== 'nextimg' ){ |
2 |
$rs = $this->PreNext[ 'nextimg' ]; |
|
在这段代码后面增加:
1 |
else if ($gtype== 'prem' ){ |
2 |
$rs = $this->PreNext[ 'prem' ]; |
4 |
else if ($gtype== 'nextm' ){ |
5 |
$rs = $this->PreNext[ 'nextm' ]; |
|
手机版本专用调用标签
手机版上一篇调用代码:
1 |
{dede:prenext get= 'prem' /} |
|
手机版下一篇调用代码:
1 |
{dede:prenext get= 'nextm' /} |
|