欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

phpcms

當(dāng)前位置:主頁 > CMS教程 > phpcms >

phpcms標(biāo)簽?zāi)0寮皩n}模板的制作

來源:本站原創(chuàng)|時間:2020-01-10|欄目:phpcms|點擊: 次

關(guān)鍵字描述:模板 制作 專題 標(biāo)簽 " < article if /if > class

phpcms標(biāo)簽?zāi)0寮皩n}模板的制作

1.標(biāo)簽?zāi)0宓闹谱?br />前面我們已經(jīng)講到了每個頻道模板的制作,但是我們只是插入對應(yīng)的標(biāo)簽代碼,如何做到顯示的效果能個性化,滿足自己的要求呢?,那么我們就要對自己的標(biāo)簽?zāi)0遄鰝€性化的設(shè)計
所有以tag_開頭的模板
都是標(biāo)簽?zāi)0?br />以文章頻道的模板為例

我們會看到
tag_articlelist.html 文章列表標(biāo)簽?zāi)0?br />tag_picarticle.html 圖片文章標(biāo)簽?zāi)0?br />剩下的兩個我們一般做模板的時候,如果自己對于js代碼不是很理解的話,我們一般不會去動它,
打開文章列表標(biāo)簽?zāi)0?br />
CODE: [Copy to clipboard] <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
{loop $articles $i $article}
{if $i%$cols==0} <tr> {/if}
<td height="20" width="{$width}">
{$article[img]} {if $showcatname}{$article[catname]}{/if} <a href="{$article[url]}" title="{$article[alt]}" target="{$target}" class="tag_title_link">{$article[title]}</a>
{if $showhits}({$article[hits]}){/if}
{if $showauthor}[作者:{$article[author]}]{/if}
{if $article[showcommentlink]}&nbsp;<a href="{PHPCMS_PATH}comment/?item=articleid&itemid={$article[articleid]}" target="_blank"><span class="color_red">評</span></a>{/if}
{if $datetype}[<span class="tag_date">{$article[adddate]}</span>]{/if}
{if $descriptionlen}<br/><span class="tag_description">&nbsp;&nbsp;&nbsp;&nbsp;{$article[description]}</span>{/if}
</td>
{if $i%$cols==($cols-1)}</tr>{/if}
{/loop}
</table>

{if $pages}
<div class="pages">{$pages}</div>
{/if} 這個里面
{loop $articles $i $article}是一個循環(huán),我們要關(guān)注的就是這個循環(huán)里面的內(nèi)容
{if $i%$cols==0} <tr> {/if} 我們在標(biāo)簽里面設(shè)定的參數(shù),顯示幾列,根據(jù)這個來控制標(biāo)簽的顯示
{$article[img]} 文章的圖片,顯示精華,置頂,還是普通文章
{if $showcatname}{$article[catname]}{/if} 所屬欄目

{$article[url]} 文章路徑

{$article[title]} 文章標(biāo)題
{if $showhits}({$article[hits]}){/if} 點擊數(shù)
{if $showauthor}[作者:{$article[author]}]{/if} 作者
{if $article[showcommentlink]} <a href="{PHPCMS_PATH}comment/?item=articleid&itemid={$article[articleid]}" target="_blank"><span class="color_red">評</span></a>{/if} 評論連接
{if $datetype}[<span class="tag_date">{$article[adddate]}</span>]{/if} 添加時間
{if $descriptionlen}<br/><span class="tag_description"> {$article[description]}</span>{/if} 描述說明

如果我們要實現(xiàn)時間的靠右對齊,那么我們可以把這個模板改成

CODE: [Copy to clipboard] <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
{loop $articles $i $article}
關(guān)鍵字描述:模板 制作 專題 標(biāo)簽 " < article if /if > class


{if $i%$cols==0} <tr> {/if}
<td height="20" width="{$width}">
{$article[img]} {if $showcatname}{$article[catname]}{/if} <a href="{$article[url]}" title="{$article[alt]}" target="{$target}" class="tag_title_link">{$article[title]}</a>
{if $showhits}({$article[hits]}){/if}
{if $showauthor}[作者:{$article[author]}]{/if}
{if $article[showcommentlink]}&nbsp;<a href="{PHPCMS_PATH}comment/?item=articleid&itemid={$article[articleid]}" target="_blank"><span class="color_red">評</span></a>{/if}
{if $descriptionlen}<br/><span class="tag_description">&nbsp;&nbsp;&nbsp;&nbsp;{$article[description]}</span>{/if}
</td>
<td>{if $datetype}[<span class="tag_date">{$article[adddate]}</span>]{/if}</td>
{if $i%$cols==($cols-1)}</tr>{/if}
{/loop}
</table>

{if $pages}
<div class="pages">{$pages}</div>
{/if} 或者設(shè)置css里面tag_date的屬性為float:right

圖片文章頁面的標(biāo)簽?zāi)0逡彩侨绱?,我們需要做的,基本上就是css的變化來控制效果,這就需要大家對于css有一個比較淺顯的掌握,具體可以參考css手冊,網(wǎng)上到處都是,指的說明的一點,css的簡寫僅僅支持IE,F(xiàn)F和opera尚不能全部支持!

2.專題模板的制作
專題頁面的制作主要設(shè)計的頁面有
special.html 專題首頁
special_list.html 專題列表頁
special_show.html專題內(nèi)容頁
tag_speciallist.html專題標(biāo)簽頁
專題是相同類型的文章組成的一個合集,大家可以把他看做一個欄目,只不過這個欄目比較特殊,它屬于一個頻道多個欄目下相同主題的文章合集,他的模板制作和文章欄目頁面的制作是一模一樣的,只不過是概念你的不同罷了,大家不要被這個概念嚇到了!

寫到這里,菠蘿教你做模板系列基本要完工了,剩下的模板中,官方在默認(rèn)模板中都有了相應(yīng)的提示文件,相信不是很難看懂
這個教程希望對大家做模板有一個啟發(fā),請大家牢牢記住這一點
phpcms的模板就是html代碼+js+標(biāo)簽
只要大家靈活掌握標(biāo)簽的調(diào)用,那么一定會做出很多個性化的pp模板的!

上一篇:PHPCMS系統(tǒng)自帶標(biāo)簽說明

欄    目:phpcms

下一篇:phpcms頻道首頁調(diào)用所有一級欄目及二級欄目

本文標(biāo)題:phpcms標(biāo)簽?zāi)0寮皩n}模板的制作

本文地址:http://mengdiqiu.com.cn/a1/phpcms/9974.html

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請與我們聯(lián)系,我們將在24小時內(nèi)進行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有