菠蘿教你做模板之周邊教程-如何頻道首頁實現(xiàn)調(diào)用所有一級欄目及其二級子欄目_PHPCms教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!
      打開頻道的首頁模板index.html
      你會看到

      CODE: [Copy to clipboard] <!--自定義欄目開始-->
      <table width="100%" cellspacing="0" cellpadding="0">
      {loop $childcats $i $cat}
      {if $i%2==0}<tr>{/if}
      <td valign="top" style="padding:0 5px;">
      <table width="100%" cellspacing="0" cellpadding="0">
      <tr>
      <td class="titlebar" width="100">{$cat[catname]}</td>
      <td width="10" height="25"><img src="{$skindir}/images/tit3_r.jpg"></td>
      <td width="225" align="right" class="bg_titlebar"><a href="{$cat[caturl]}" class="more">更多</a>&nbsp;</td>
      <td width="36"><img src="{$skindir}/images/tit2_r.jpg"></td>
      </tr>
      </table>

      {$articlelist(0,$channelid,$cat[catid],1,0,0,10,30,0,0,0,$cat[ordertype],2,1,0,0,$cat[target],1)}

      </td>
      {if $i%2==1}</tr>{/if}
      {/loop}
      </table>
      <!--自定義欄目結(jié)束--> 把他換成

      CODE: [Copy to clipboard] <!--自定義欄目開始-->
      <table width="100%" cellspacing="0" cellpadding="0">
      {loop $childcats $i $cat}
      {if $i%2==0}<tr>{/if}
      <td valign="top" style="padding:0 5px;">
      <table width="100%" cellspacing="0" cellpadding="0">
      <tr>
      <td class="titlebar" width="100">{$cat[catname]}</td>
      <td width="10" height="25"><img src="{$skindir}/images/tit3_r.jpg"></td>
      <td width="225" align="right" class="bg_titlebar"><a href="{$cat[caturl]}" class="more">更多</a>&nbsp;</td>
      <td width="36"><img src="{$skindir}/images/tit2_r.jpg"></td>
      </tr>
      </table>

      {loop get_childcat($channelid,$cat[catid]) $childid}
      &nbsp;&nbsp;<a href="{$childid[caturl]}">{$childid[catname]}</a>

      查看更多 phpcms教程  phpcms模板

      共2頁上一頁12下一頁
      來源:模板無憂//所屬分類:PHPCms教程/更新時間:2007-01-29
      相關(guān)PHPCms教程