織夢(mèng)dedecms模板制作時(shí),循環(huán)遞增autoindex使用方法整理_DedeCms教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
織夢(mèng)dedecms模板制作時(shí),循環(huán)遞增autoindex使用方法整理。僅供大家學(xué)習(xí)參考,希望對(duì)你有所幫助。
- {dede:arclist titlelen='26' row='10'}
- <li><a title="[field:title function='htmlspecialchars(@me)'/] " href="[field:arcurl /]">[field:title /]</a></li>
- [field:global name=autoindex runphp="yes"]if(@me%5==0)@me="<br/>";else @me="";[/field:global]
- {/dede:arclist}
紅色的即為autoindex標(biāo)簽用法。意思是,循環(huán)調(diào)用文章時(shí),到第五條時(shí)輸出<br/>,否則輸出空。這樣我們就實(shí)現(xiàn)了第五篇文章下面進(jìn)行換行。配合css和簡(jiǎn)單的php等代碼使用,達(dá)到更多效果。
循環(huán)+1的寫法:
- [field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global]
- 頻道頁使用時(shí)可以換成itemindex標(biāo)簽,原理同autoindex
- {dede:global name='itemindex'/}
- {dede:global name='itemindex' runphp='yes'}if(@me%5==0)@me="<br/>";else @me="";{/dede:global}
- {dede:global name='itemindex' runphp='yes'}@me=@me+1;{/dede:global}
織夢(mèng)默認(rèn)的搜索頁不支持autoindex標(biāo)簽,需要修改核心文件增加支持:
- 找到文件:include/arc.searchview.class.php
- 里面找到代碼:$this->dtp2->LoadSource($innertext);
- 下面加上:
- $GLOBALS['autoindex'] = 0;
- ------------------------------------
- if($row = $this->dsql->GetArray("al"))
- {
- 下面加上:
- $GLOBALS['autoindex']++;
- $ids[$row['id']] = $row['id'];
有需要的可以來記錄下來。
查看更多 DedeCms教程 織夢(mèng)模板 織夢(mèng)DedeCms視頻教程 織夢(mèng)dedecms專題
相關(guān)DedeCms教程:
- 織夢(mèng)DEDECMS{dede:freelist/}列表調(diào)用增加排序方式
- dedecms中一問一答式調(diào)用問答模塊問與答簡(jiǎn)介調(diào)用問答系統(tǒng)代碼
- dede審核時(shí)間與更新文章發(fā)布日期同步
- 如何在DedeCms 標(biāo)記中運(yùn)行PHP
- 徹底解決dedecms專題內(nèi)容的介紹文字最多250個(gè)字的問題
- dedecms的首頁、內(nèi)容頁、列表頁中 動(dòng)態(tài)JS調(diào)用評(píng)論數(shù)
- dedecms個(gè)人空間默認(rèn)的個(gè)人書簽刪除方法
- 織夢(mèng)DedeCMS欄目二級(jí)域名綁定方法
- DedeCms去掉欄目頁當(dāng)前位置導(dǎo)航最后的分隔符“>”
- 織夢(mèng)dedecms首頁調(diào)用企業(yè)名稱、簡(jiǎn)介、公司logo等的方法
- dedecms后臺(tái)與服務(wù)器安全檢測(cè)步驟參考方法
- 解決dede封面模板不能顯示副欄目?jī)?nèi)容的問題
DedeCms教程教程Rss訂閱Cms教程搜索
DedeCms教程推薦
- dede不使用js調(diào)用非DEDE數(shù)據(jù) 如論壇等其他cms數(shù)據(jù)
- DEDE+DZ+PW+SS/XS+PHP168+商城+問吧整合詳解
- dede網(wǎng)站內(nèi)容頁如何調(diào)取欄目頁標(biāo)題和seo標(biāo)題
- DedeCms教程:windows server 2003 php 環(huán)境搭建
- dedecms實(shí)現(xiàn)編輯文檔自動(dòng)更新主頁和列表頁
- DedeCMS的自定義表單增加"全選/全不選"的功能按鈕
- DEDECMS 游客投稿三步搞定
- 文章描述中出現(xiàn)的英文長(zhǎng)度大于table寬度
- 【Mynews 標(biāo)記 使用實(shí)例】-DedeCMS模板制作使用實(shí)例教程(9)
- Dedecms4.0RC1整合DZ5.5
猜你也喜歡看這些
- 紅色英文html5響應(yīng)式產(chǎn)品展示自適應(yīng)網(wǎng)站模板
- 織夢(mèng)響應(yīng)式機(jī)器設(shè)備企業(yè)公司網(wǎng)站模板
- V3教育風(fēng)格
- dedecms軟件公司-科技公司-網(wǎng)絡(luò)公司模板
- dedecms電腦報(bào)修系統(tǒng)工作室下載站(整站文件)
- DEDEcms服務(wù)型公司織夢(mèng)企業(yè)模板
- 酷維網(wǎng)DEDECMS會(huì)員中心全套模板
- 灰色風(fēng)格UTF-8編碼的英文模板
- dedecms內(nèi)核二次開發(fā)的大型房產(chǎn)網(wǎng)門戶網(wǎng)站
- dedecms藍(lán)色環(huán)保科技水處理公司企業(yè)網(wǎng)站模板(帶圖集)
- 相關(guān)鏈接:
復(fù)制本頁鏈接| 搜索織夢(mèng)dedecms模板制作時(shí),循環(huán)遞增autoindex使用方法整理| DedeCms模板| Dede模板| 織夢(mèng)模板| dedecms
- 教程說明:
DedeCms教程-織夢(mèng)dedecms模板制作時(shí),循環(huán)遞增autoindex使用方法整理。