【小(xiǎo)編推薦】destoon的(de₹‍₩¥)資訊詳細頁面加一(yī)個(gè)按分(fēn∏£¶)類浏覽的(de)分(fēn)類的(de)方法

2014-07-17  &n ☆bsp;|   發布者:梁國(guó)芳&nb©φ&λsp;  |  &nbs←☆p;查看(kàn):3320次

destoon

先上(shàng)圖看(kàn)看(kàn)效果,這(zh•₹™<è)是(shì)資訊的(de)內(nèi)容詳細頁面,在它的(d¥©¶e)右部分(fēn)添加一(yī)個(gè)和(hé)首頁 £€Ω一(yī)樣的(de)按分(fēn)類浏覽的(de)部分(fēn).₽÷✔

\

下(xià)面來(lái)說(shuō)一(yī)下(xià)具體(tǐ)的(÷σα₹de)操作(zuò)步驟:

1.先打開(kāi)根目錄下(xià)的(de)÷∑≥♥module/article/index.inc.php的(de)文(wéλ€n)件(jiàn),找找是(shì)不(bù)是✘∑σ(shì)有(yǒu)段這(zhè)個(gè):

$maincat = $childcat = get_maincε₽at(0, $moduleid, 1);

複制(zhì)這(zhè)段代碼.

2.還(hái)是(shì)打開(kāi)module/article/s£ ←how.inc.php的(de)文(wén)件(jiàn),在 倒數(☆‌shù)第五行(xíng) $template = ‌™'show'; 的(de)前面,把剛剛複制(zhì)的★$​≤(de)$maincat = $childc₩ at = get_maincat(0, $moduleid, 1);‌™'粘貼到(dào)這(zhè)裡(lǐ)保存就(jiù)可(kě)以了(l☆♣δ☆e).

3.打開(kāi)他(tā)的(de)模闆文(wén)件(jiàn):根目錄下$₹(xià)的(de)template/def✔>✔₹ault/article/index.htm的(de)文(wé₽¶γn)件(jiàn),找到(dào)按分(fēn)類浏覽的(de)那★• (nà)部分(fēn).

{if $MOD[show_icat]}
  <div class="box_‌↑ head_1"><d₩‌≥iv><strong>按分(fβα♦ēn)類浏覽</strong></div><  £/div>
  <div class="Ωβ☆©box_body">
  <table width="∏↕;100%" cellpadding=&q→α'uot;3">
  {loop $maincat $k $v}
  {if $k%2==0}<tr>{/if}
  <td><a href=&q©" uot;{$MOD[linkurl]}{$v[linkurl]}&quo<α→t;>{set_style($v[catname],<™♦ $v[style])}</a> <span ★​♦class="f_gray px10&quo ♣≤‍t;>({$v[item]})<‌π;/span></td>
  {if $k%2==1}</tr>λφ‌;{/if}
  {/loop}
  </table>
  </div>
  <div class=π∑↑"b10 c_b">&nbsp;↑₽</div>
  {/if}