步驟如下:
1、修改/include/taglib/channel.lib.php檔案的lib_channel函式,把如下程式碼
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";
#修改成
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|,line|1";
|後面的是預設值
2、修改/include/taglib/channel.lib.php檔案的lib_channel函數,在
extract($ctag->CAttribute->Items, EXTR_SKIP);
下面加入如下程式碼:
$default_line = $ctag->CAttribute->Items["line"];//默认属性里设置的行数
3、修改/include/taglib/channel.lib.php檔案的lib_channel函式,把如下程式碼
$row['sonids'] = $row['rel'] = '';
修改成如下程式碼:
$row['sonids'] = $row['rel'] = ''; $row['line'] = $default_line+$i;
推薦教學課程:dedecms教學
#以上是怎麼為織夢5.x{dede:channel}標籤增加行數序號屬性的詳細內容。更多資訊請關注PHP中文網其他相關文章!