Home > Article > CMS Tutorial > How to add the line number and sequence number attribute to the Dreamweaver 5.x{dede:channel} tag
The steps are as follows:
1. Modify the lib_channel function of the /include/taglib/channel.lib.php file and modify the following code
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";
Into
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|,line|1";
| What follows is the default value
2. Modify the lib_channel function of the /include/taglib/channel.lib.php file and add the following code under
extract($ctag->CAttribute->Items, EXTR_SKIP);
:
$default_line = $ctag->CAttribute->Items["line"];//默认属性里设置的行数
3. Modify the lib_channel function of the /include/taglib/channel.lib.php file and change the following code
$row['sonids'] = $row['rel'] = '';
to the following code:
$row['sonids'] = $row['rel'] = ''; $row['line'] = $default_line+$i;
Recommended tutorial :dedecms tutorial
The above is the detailed content of How to add the line number and sequence number attribute to the Dreamweaver 5.x{dede:channel} tag. For more information, please follow other related articles on the PHP Chinese website!