dedecms列表頁(yè)有縮略圖顯示圖文列表沒(méi)有則文字列
導(dǎo)讀:織夢(mèng)技術(shù)織夢(mèng)技術(shù)首先看下效果圖吧 或者你可以進(jìn)入列表頁(yè) 查看效果 ,整體思路其實(shí)就是利用dedecms的[field:array runphp=yes]這個(gè)標(biāo)簽的@me包含了需手機(jī)模板dededede5.7模板。
首先看下效果圖吧
或者你可以進(jìn)入跟版網(wǎng)列表頁(yè)查看效果,整體思路其實(shí)就是利用dedecms的[field:array runphp='yes']這個(gè)標(biāo)簽的@me包含了需要的所有標(biāo)簽,這樣就可以通過(guò)@me["litpic"]來(lái)判斷文章是否有縮略圖,進(jìn)而分兩種形式輸出列表html,即有縮略圖的和沒(méi)有縮略圖的
具體代碼如下:
<style type="text/css"> .arcList .itemMod{ border-bottom:dashed 1px #ccc; margin-bottom:15px; padding-bottom:15px;} .arcList .imgdede5.7模板ListItem{ height:130px; padding-left:215px; position:relative;} .arcList .img{ left:0; position:absolute; top:0;} .arcList .arcTit{ font-family:Microsoft Yahei; font-size:16px; font-weight:700;} .arcList .attrs{ height:22px; line-height:22px; margin:10px 0;} .arcList .click{ margin-left:50%;} .arcList .infos{ color:#666; font-size:12px; margin:0;} </style> <div class="arcList"> {dede:list pagesize織夢(mèng)cms模板='10'} [field:array runphp='yes'] if(empty(@me["litpic"]) || preg_match('/defaultpic/', @me["litpic"])){ @me = '<div class="itemMod txtListItem"><div class="text"><div class="arcTit"><a class="t" href="'.@me["arcurl"].'">'.@me["fulltitle"].'</a></div><p class="attrs">'.GetDateTimeMK(@me["pubdate"]).'<span class="click"><span>點(diǎn)擊:</span>'.@me["click"].'</span></p><p class="infos">'.@me["infos"].' ... <a class="fc_orange" href="'.@me["arcurl"].'" title="'.@me["fulltitle"].'">[全文]</a></p></div></div>'; } else{ @me = '<div class="itemMod imgListItem"><a class="img" href="'.@me["arcurl"].'"><img class="lazy" src="'.@織夢(mèng)模板me["litpic"].'" width="200" height="130" alt="'.@me["fulltitle"].'" /></a><div class="text"><div class="arcTit"><a class="t" href="'.@me["arcurl"].'">'.@me["fulltitle"].'</a></div><p class="attrs">'.GetDateTimeMK(@me["pubdate"]).'<span class="click">點(diǎn)擊:'.@me["click"].'</span></p><p class="infos">'.@me["infos"].' ... <a class="fc_orange" href="'.@me["arcurl"].'" title="'.@me["fulltitle"].'">[全文]</a></p></div></div>'; } [/field:array] {/dede:list} </div>聲明: 本文由我的SEOUC技術(shù)文章主頁(yè)發(fā)布于:2023-07-18 ,文章dedecms列表頁(yè)有縮略圖顯示圖文列表沒(méi)有則文字列主要講述列表,縮略圖,織夢(mèng)網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請(qǐng)保留鏈接: http://www.bifwcx.com/article/web_29666.html
為你推薦與dedecms列表頁(yè)有縮略圖顯示圖文列表沒(méi)有則文字列相關(guān)的文章
-
當(dāng)前欄目調(diào)用上級(jí)欄目名稱(chēng)的辦法,織夢(mèng)文
(106)人喜歡 2023-07-18 -
Dedecms自定義表單后臺(tái)列表展現(xiàn)方式更改
(142)人喜歡 2023-07-18 -
用SQL命令刪除dede版權(quán)信息的官方鏈接,D
(124)人喜歡 2023-07-18 -
Dedecms后臺(tái)驗(yàn)證碼不顯示的解決方法,織夢(mèng)
(102)人喜歡 2023-07-18 -
Dedecms搜索頁(yè)面調(diào)用最新文章的方法,織夢(mèng)
(77)人喜歡 2023-07-18 -
DedeCMS轉(zhuǎn)換WordPress方法-親測(cè)成功,DEDE技術(shù)
(183)人喜歡 2023-07-18