Dream weaving template The {dede: channel} tag, which is often used in, calls navigation. The following method can be used to achieve the effect of number in this tag.

Example:

<a href="#" class="d1"></a>
<a href="#" class="d2"></a>
<a href="#" class="d3"></a>
....

code:

{dede:channel type='top' line='1'}
<a href="[field:typeurl/]" class="d[field:line/]"></a>
{/dede:channel}

Note: line='1 'means increasing from 1

Modification method:

1. Modify the lib_channel function of the/include/taglib/channel.lib.php file, and change the following code

$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";

Modify to

$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|,line|1";

|The following is the default value

2. Modify the lib_channel function of the/include/taglib/channel.lib.php file in the

extract($ctag->CAttribute->Items, EXTR_SKIP);

Add the following code:

//Number of rows set in default attribute
$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'] = '';

The code is modified as follows:

$row['sonids'] = $row['rel'] = '';
$row['line'] = $default_line+$i;

Post reply

Can't comment until