Tacna
2014-05-02, 06:36 PM
名称:channel
功能:织梦常用标记,通常用于网站顶部以获取站点栏目信息,方便网站会员分类浏览整站信息
语法:
{dede:channel type='top' row='8' currentstyle="<li><a href='~typelink~' class='thisclass'>~typename~</a> </li>"}
<li><a href='[field:typelink/]'>[field:typename/]</a> </li>
{/dede:channel}
</demo>
文件:
\include\taglib\channel.lib.php
function lib_channel(&$ctag,&$refObj)
默认底层模板:
channel_list.htm
参数:
typeid = '0' 栏目ID
reid = '0' 上级栏目ID
row = '100' 调用栏目数
col = '1' 分多少列显示(默认为单列)
type = 'son | sun' son表示下级栏目,self表示同级栏目,top顶级栏目
currentstyle = '' 应用样式
底层字段:
ID(同id),typeid, typelink, typename, typeurl,typedir(仅表示栏目的网址)
打开include\taglib\channel.lib.php
修改
function lib_channel(&$ctag,&$refObj)
{
global $dsql;
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = $ctag->GetInnerText();
$line = empty($row) ? 100 : $row;
为
function lib_channel(&$ctag,&$refObj)
{
global $dsql;
$attlist = "typeid|0,reid|0,row|500,col|1,type|son,currentstyle|,cacheid|";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = $ctag->GetInnerText();
$line = empty($row) ? 500 : $row;
这样就可最多调用500个栏目名称了。
功能:织梦常用标记,通常用于网站顶部以获取站点栏目信息,方便网站会员分类浏览整站信息
语法:
{dede:channel type='top' row='8' currentstyle="<li><a href='~typelink~' class='thisclass'>~typename~</a> </li>"}
<li><a href='[field:typelink/]'>[field:typename/]</a> </li>
{/dede:channel}
</demo>
文件:
\include\taglib\channel.lib.php
function lib_channel(&$ctag,&$refObj)
默认底层模板:
channel_list.htm
参数:
typeid = '0' 栏目ID
reid = '0' 上级栏目ID
row = '100' 调用栏目数
col = '1' 分多少列显示(默认为单列)
type = 'son | sun' son表示下级栏目,self表示同级栏目,top顶级栏目
currentstyle = '' 应用样式
底层字段:
ID(同id),typeid, typelink, typename, typeurl,typedir(仅表示栏目的网址)
打开include\taglib\channel.lib.php
修改
function lib_channel(&$ctag,&$refObj)
{
global $dsql;
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = $ctag->GetInnerText();
$line = empty($row) ? 100 : $row;
为
function lib_channel(&$ctag,&$refObj)
{
global $dsql;
$attlist = "typeid|0,reid|0,row|500,col|1,type|son,currentstyle|,cacheid|";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = $ctag->GetInnerText();
$line = empty($row) ? 500 : $row;
这样就可最多调用500个栏目名称了。