Home  >  Article  >  CMS Tutorial  >  How to add the line number and sequence number attribute to the Dreamweaver 5.x{dede:channel} tag

How to add the line number and sequence number attribute to the Dreamweaver 5.x{dede:channel} tag

王林
王林Original
2019-11-15 10:40:386141browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn