{dede:prenext get='pre'/} {dede:prenext get='next'/}
大家很熟悉,這就是DEDECMS織夢的上一篇 下一篇調用代碼。
現在我們將做以下修改,將上一篇下一篇只調用URL地址。
找到include目錄下的這個文件:arc.archives.class.php
找到這幾行:
$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> "; $this->PreNext['pre'] = "上一篇:沒有了"; $this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> "; $this->PreNext['next'] = "下一篇:沒有了 ";
分別替換為以下幾行:
$this->PreNext['pre'] = "$mlink"; $this->PreNext['pre'] = "javascript:window.alert('上一篇:沒有了');"; $this->PreNext['next'] = "$mlink"; $this->PreNext['next'] = "javascript:window.alert('下一篇:沒有了');";
以上是文章內容模型的上一篇下一篇調用標簽。圖集模型的修改地方如下:
找到這幾行:
*$this->PreNext['preimg'] = "<a href='$mlink'><img src="{$preRow['litpic']}" alt="{$preRow['title']}"/></a> "; $this->PreNext['preimg'] ="<img src="/templets/default/images/nophoto.jpg" alt="對不起,沒有上一圖集了!"/>"; $this->PreNext['nextimg'] = "<a href='$mlink'><img src="{$nextRow['litpic']}" alt="{$nextRow['title']}"/></a> "; $this->PreNext['nextimg'] ="<a href='javascript:void(0)' alt=""><img src="/templets/default/images/nophoto.jpg" alt="對不起,沒有下一圖集了!"/></a>";
分別替換為以下幾行:
$this->PreNext['preimg'] = "$mlink"; $this->PreNext['preimg'] ="javascript:window.alert('對不起,沒有上一圖集了!');"; $this->PreNext['nextimg'] = "$mlink"; $this->PreNext['nextimg'] ="javascript:window.alert('對不起,沒有下一圖集了!');";
Copyright © 2009-2019 Ywcms.Com All Right Reserved. 湘ICP備16006489號-2