久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動:電腦PC端+手機端+微網站+自適應網頁多模板選擇-建站388元起價!!!
當前位置:主頁 > 網站建設 > 在DedeCMS中的文章頁面的上一篇下一篇鏈接處增加

在DedeCMS中的文章頁面的上一篇下一篇鏈接處增加

時間:2023-07-20 12:07:20 閱讀: 文章分類: 網站建設 作者: 織夢網站員

導讀:織夢文章織夢文章點評 :DedeCMS系統默認的是在文章的上一篇和下一篇的鏈接只顯示標題,但是有時我們希望顯示其他信息,比如文章的摘要。下面給大家介紹一下方法 DedeCMS系織夢文章模板dede織夢模板。

織夢文章模板dede織夢模板點評:DedeCMS系統默認的是在文章的上一篇和下一篇的鏈接只顯示標題,但是有時我們希望顯示其他信息,比如文章的摘要。下面給大家介紹一下方法    

  DedeCMS系統默認的是在文章的上一篇和下一篇的鏈接只顯示標題,但是有時我們希望顯示其他信息,比如文章的摘要。 找到arc.archives.class.php文件,在include目錄下面,然后查找“GetPreNext”這個函數,將

$query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic, t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath from `jcode_archives` arc left join jcode_arctype t on arc.typeid=t.id ";

  改成:

$query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic, arc.description,t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath from `jcode_archives` arc left join jcode_arctype t on arc.typeid=t.id ";

  比較一下其實現在只是多了arc.description,這就是文章的摘要,也稱為文章描述。

  需要注意的是這里的jcode_archives和jcode_arctype中的jcode_是我表結構的前綴,你需要將這個前綴改成你自己的。

dede商城模板

  現在我們已經將文章描述從數據庫里面取出來了。下一步將描述顯示在頁面上,顯示連接文字的代碼本來是這樣的,你可以通過查找找到,其實就在上面那段代碼的附近:

if(is_array($preRow)) { $mlink = GetFileUrl($preRow['id'],$preRow['typeid'],$preRow[織夢模板'senddate'],$preRow['title'],$preRow['ismake'],$preRow['arcrank'], $preRow['namerule'],$preRow['typedir'],$preRow['money'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']); $this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> "; $this->PreNext['preimg'] = "<a href='$mlink'><img src="{$preRow['litpic']}" alt="{$preRow['title']}"/></a> "; } else { $this->PreNext['pre'] = "上一篇:沒有了 "; $this->PreNext['preimg'] ="<img src="/templets/default/images/nophoto.jpg" alt="對不起,沒有上一圖集了!"/>"; } if(is_array($nextRow)) { $mlink = GetFileUrl($nextRow['id'],$nextRow['typeid'],$nextRow['senddate'],$nextRow['title'],$nextRow['ismake'],$nextRow['arcrank'], $nextRow['namerule'],$nextRow['typedir'],$nextRow['money'],$nextRow['filename'],$nextRow['moresite'],$nextRow['siteurl'],$nextRow['sitepath']); $this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> "; $this->PreNext['nextimg'] = "<a href='$mlink'><img src="{$nextRow['litpic']}" alt="{$nextRow['title']}"/></a> "; } else { $this->PreNext['next'] = "下一篇:沒有了 "; $this->PreNext['nextimg'] ="<a href='javascript:void(0)' alt=""><img src="/templets/default/images/nophoto.jpg" alt="對不起,沒有下一圖集了!"/></a>"; } }

關鍵詞標簽: CMS 下一篇 文章

聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-20 ,文章在DedeCMS中的文章頁面的上一篇下一篇鏈接處增加主要講述文章,下一篇,CMS網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_31932.html

我的IDC 網站建設技術SEOUC.COM
專注網站建設,SEO優化,小程序設計制作搭建開發定制網站等,數千家網站定制開發案例,網站推廣技術服務。
  • 5000+合作客服
  • 8年從業經驗
  • 150+覆蓋行業
  • 最新熱門源碼技術文章

    主站蜘蛛池模板: 茶陵县| 扬中市| 闽清县| 探索| 赞皇县| 丰城市| 安陆市| 邹城市| 许昌县| 黄骅市| 贵南县| 建阳市| 乐东| 江阴市| 油尖旺区| 阜新| 大悟县| 双流县| 临洮县| 吉林省| 铜梁县| 固阳县| 神池县| 大冶市| 普安县| 德江县| 姚安县| 宜川县| 永寿县| 晴隆县| 德兴市| 广德县| 望奎县| 普兰店市| 台中市| 崇左市| 平泉县| 津市市| 环江| 商丘市| 彭水|