phpcms標(biāo)簽?zāi)0寮皩n}模板的制作
互聯(lián)網(wǎng) 發(fā)布時間:2009-06-06 15:44:59 作者:jb51
我要評論

關(guān)鍵字描述:模板 制作 專題 標(biāo)簽 " < article if /if > class
phpcms標(biāo)簽?zāi)0寮皩n}模板的制作
1.標(biāo)簽?zāi)0宓闹谱?前面我們已經(jīng)講到了每個頻道模板的制作,但是我們只是插入對應(yīng)的標(biāo)簽代碼,如何做到顯示的效果能個性化,滿足自己的要求呢?,那么我們就要對
關(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]} <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}
</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}
#p# 關(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]} <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"> {$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標(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]} <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}
</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}
#p# 關(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]} <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"> {$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模板的!
相關(guān)文章
- 在使用phpcms的時候遇到了一些問題,主要是模板頁面使用的標(biāo)簽,記錄下以后再做的時候可以使用到2014-01-27
關(guān)鍵字描述:制作 模板 " < 頁面 > id downurl 下載 標(biāo)簽
phpcms下載頻道的模板制作
我們在前面3節(jié)已經(jīng)講到了如何制作首頁、文章頻道的模板,今天我們講下載
2009-06-06 
phpcms V9模板標(biāo)簽生成器 V2.0 綠色版
phpcms在市場的占有率是很高的,phpcms V9模板代碼生成器是一款非常專業(yè)的phpcms V9模板代碼快速生成軟件。非常不錯,需要的朋友前來下載
2019-08-14