织梦cms

推荐列表 站点导航

当前位置:首页 > 建站教程 > 织梦cms >

织梦如何调用四级栏目

来源:网络整理  作者:  发布时间:2020-12-14 04:34
织梦调用四级子栏目,首先需要修改文件:\include\taglib目录下的channel.lib.php,请将以下代码全部复制替换上述文件:...

}

[/field:sonchannel1]

?>

$likeType .= $dtp2->GetResult();

}

}

{

if($col>1)

$i += $col - 1;

}

}

//if($_sys_globals['typeid']>0) $typeid = $_sys_globals['typeid'];

 

{

}

if($typeid==0) {

$reid=0;

$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

{

$linkOkstr = str_replace("~typename~",$row['typename'],$linkOkstr);

reset($dsql2);

$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

$dtp2->SetNameSpace("field","[","]");

 

if($typeid==0) {

if(isset($row[$ctag->GetName()]))

 

{

$dsql2 = clone $dsql;

}//Loop for $i

}

$dtp2->LoadSource($innertext);

 

 

$dtp2->Assign($tagid,lib_channel_son($ctag,$row['id'],$dsql3));

$likeType .= " </dl>\r\n";

$i += $col - 1;

if($col>1) $likeType .= "<dl>\r\n";

$dsql->FreeResult();

{

[/field:sonchannel0]

$dtp2->LoadSource($innertext);

$likeType .= " </dl>\r\n";

 

if(empty($typeid) && $envs['typeid']!=0)

FillAttsDefault($ctag->CAttribute->Items,$attlist);

$likeType = GetCacheBlock($cacheid);

}

return '';

{

$linkOkstr = $currentstyle;

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

}//Loop for $i

if($col>1) $likeType .= "</dd>\r\n";

{

}

$dsql->Execute();

From dede_arctype where reid=0 And ishidden<>1 order by sortrank asc limit 0,$row";

$line = $row;

if($col>1) $likeType .= "<dd>\r\n";

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">---[field:typename/]</a></li>

$innertext = $ctag->GetInnerText();

}

}

if($col>1) $likeType .= "<dl>\r\n";

$likeType .= $dtp2->GetResult();

if(is_array($dtp2->CTags))

if($col>1)

{

{dede:channel type='son' typeid='3'}

$dsql2->SetQuery($sql);

for($i=0;$i < $line;$i++)

//if($_sys_globals['typeid']>0) $typeid = $_sys_globals['typeid'];

if(isset($row[$ctag->GetName()]))

$dtp2 = new DedeTagParse();

elseif (preg_match('/^sonchannel[0-9]*$/',$ctag->GetName()))

$innertext = $ctag->GetInnerText();

$row['sonids'] = GetSonIds($row['id'], 0, false);

if($needRel)

$attlist = "row|100,col|1,currentstyle|";

else if($type=="self")

$linkOkstr = str_replace("~rel~",$row['rel'],$linkOkstr);

[field:sonchannel1]

[/field:sonchannel3]

global $_sys_globals,$envs,$dsql;

$row['typelink'] = $row['typeurl'] = GetOneTypeUrlA($row);

}else

if($currentstyle!='')

return '';

$linkOkstr = str_replace("~id~",$row['id'],$linkOkstr);

function lib_channel_son($ctag,$typeid = 0,$dsql2)

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">[field:typename/]</a></li>

<?php

<ul>

FillAttsDefault($ctag->CAttribute->Items,$attlist);

if($row['sonids']=='') $row['rel'] = '';

}

for($j=0;$j<$col;$j++)

return '';

for($i=0;$i < $line;$i++)

$GLOBALS['autoindex']++;

function lib_channel(&$ctag,&$refObj)

{

$linkOkstr = str_replace("~typelink~",$row['typelink'],$linkOkstr);

$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

}

$dtp2->Assign($tagid,$row[$ctag->GetName()]);

$needRel = false;

$dtp2->Assign($tagid,$row[$ctag->GetName()]);

2、在模板中调用实例:

$dtp2->SetNameSpace("field","[","]");

$row['sonids'] = $row['rel'] = '';

织梦调用四级子栏目,首先需要修改文件:\include\taglib目录下的channel.lib.php,请将以下代码全部复制替换上述文件:

$totalRow = $dsql->GetTotalRow();

}

if(is_array($dbrow)) $reid = $dbrow['reid'];

}

$dsql->Execute();

}else{

if( ($row['id']==$typeid || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' )

{

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">===[field:typename/]</a></li>

$reid = 0;

{

else if($type=="son")

}

[field:typename/]

$likeType = '';

$reid = $envs['reid'];

reset($dsql3);

$line = $row;

$GLOBALS['autoindex'] = 0;

if(ereg(':rel', $innertext)) $needRel = true;

if($innertext=='') $innertext = GetSysTemplets("channel_list.htm");

return $likeType;

{

{

$likeType = '';

$dtp2 = new DedeTagParse();

{

if($type=='top')

}

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

foreach($dtp2->CTags as $tagid=>$ctag){

}

if($reid==0 && $typeid>0)

if($cacheid !='') {

if($col>1) $likeType .= "<dd>\r\n";

$row['typelink'] = $row['typeurl'] = GetOneTypeUrlA($row);

//And id<>'$typeid'

{

if($col>1) $likeType .= "</dd>\r\n";

$dsql3 = clone $dsql2;

$dsql->SetQuery($sql);

$typeid = $envs['typeid'];

}

{

}

{

$likeType .= $linkOkstr;

$cacheid = trim($cacheid);

//检查是否有子栏目,并返回rel提示(用于二级菜单)

$row['typelink'] = GetOneTypeUrlA($row);

From dede_arctype where reid='$typeid' And ishidden<>1 order by sortrank asc limit 0,$row";

$dsql2->FreeResult();

$dtp2->Assign($tagid,lib_channel_son($ctag,$row['id'],$dsql2));

{

if($row=$dsql->GetArray())


$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

[field:sonchannel3]

else $row['rel'] = " rel='dropmenu{$row['id']}'";

}//Loop Col

{

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">===[field:typename/]</a></li>

From dede_arctype where reid='$typeid' And ishidden<>1 order by sortrank asc limit 0,$row";

//处理同级栏目中,当前栏目的样式

$topid = 0;

foreach($dtp2->CTags as $tagid=>$ctag){

if(is_array($dtp2->CTags))

if($likeType != '') return $likeType;

[field:sonchannel0]

}

for($j=0;$j<$col;$j++)

[field:sonchannel2]

}

{

{

if(empty($sql)) return '';

if($reid==0) {

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

$dsql2->Execute();

}

}

}//Loop Col


[/field:sonchannel2]

{

$dbrow = $dsql->GetOne("Select reid From dede_arctype where id='$typeid' ");

}

$dsql->SetQuery($sql);

{

elseif (preg_match('/^sonchannel[0-9]*$/',$ctag->GetName()))

if($type==''||$type=='sun') $type="son";

//And id<>'$typeid'

}

return $likeType;

{

{

if($row=$dsql2->GetArray())

From `dede_arctype` where reid='$reid' And ishidden<>1 order by sortrank asc limit 0,$row";

相关热词: 织梦 调用

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://www.juheyunku.com/jz/dedecms/3616.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

织梦如何调用四级栏目

2020-12-14 编辑:

}

[/field:sonchannel1]

?>

$likeType .= $dtp2->GetResult();

}

}

{

if($col>1)

$i += $col - 1;

}

}

//if($_sys_globals['typeid']>0) $typeid = $_sys_globals['typeid'];

 

{

}

if($typeid==0) {

$reid=0;

$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

{

$linkOkstr = str_replace("~typename~",$row['typename'],$linkOkstr);

reset($dsql2);

$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

$dtp2->SetNameSpace("field","[","]");

 

if($typeid==0) {

if(isset($row[$ctag->GetName()]))

 

{

$dsql2 = clone $dsql;

}//Loop for $i

}

$dtp2->LoadSource($innertext);

 

 

$dtp2->Assign($tagid,lib_channel_son($ctag,$row['id'],$dsql3));

$likeType .= " </dl>\r\n";

$i += $col - 1;

if($col>1) $likeType .= "<dl>\r\n";

$dsql->FreeResult();

{

[/field:sonchannel0]

$dtp2->LoadSource($innertext);

$likeType .= " </dl>\r\n";

 

if(empty($typeid) && $envs['typeid']!=0)

FillAttsDefault($ctag->CAttribute->Items,$attlist);

$likeType = GetCacheBlock($cacheid);

}

return '';

{

$linkOkstr = $currentstyle;

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

}//Loop for $i

if($col>1) $likeType .= "</dd>\r\n";

{

}

$dsql->Execute();

From dede_arctype where reid=0 And ishidden<>1 order by sortrank asc limit 0,$row";

$line = $row;

if($col>1) $likeType .= "<dd>\r\n";

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">---[field:typename/]</a></li>

$innertext = $ctag->GetInnerText();

}

}

if($col>1) $likeType .= "<dl>\r\n";

$likeType .= $dtp2->GetResult();

if(is_array($dtp2->CTags))

if($col>1)

{

{dede:channel type='son' typeid='3'}

$dsql2->SetQuery($sql);

for($i=0;$i < $line;$i++)

//if($_sys_globals['typeid']>0) $typeid = $_sys_globals['typeid'];

if(isset($row[$ctag->GetName()]))

$dtp2 = new DedeTagParse();

elseif (preg_match('/^sonchannel[0-9]*$/',$ctag->GetName()))

$innertext = $ctag->GetInnerText();

$row['sonids'] = GetSonIds($row['id'], 0, false);

if($needRel)

$attlist = "row|100,col|1,currentstyle|";

else if($type=="self")

$linkOkstr = str_replace("~rel~",$row['rel'],$linkOkstr);

[field:sonchannel1]

[/field:sonchannel3]

global $_sys_globals,$envs,$dsql;

$row['typelink'] = $row['typeurl'] = GetOneTypeUrlA($row);

}else

if($currentstyle!='')

return '';

$linkOkstr = str_replace("~id~",$row['id'],$linkOkstr);

function lib_channel_son($ctag,$typeid = 0,$dsql2)

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">[field:typename/]</a></li>

<?php

<ul>

FillAttsDefault($ctag->CAttribute->Items,$attlist);

if($row['sonids']=='') $row['rel'] = '';

}

for($j=0;$j<$col;$j++)

return '';

for($i=0;$i < $line;$i++)

$GLOBALS['autoindex']++;

function lib_channel(&$ctag,&$refObj)

{

$linkOkstr = str_replace("~typelink~",$row['typelink'],$linkOkstr);

$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

}

$dtp2->Assign($tagid,$row[$ctag->GetName()]);

$needRel = false;

$dtp2->Assign($tagid,$row[$ctag->GetName()]);

2、在模板中调用实例:

$dtp2->SetNameSpace("field","[","]");

$row['sonids'] = $row['rel'] = '';

织梦调用四级子栏目,首先需要修改文件:\include\taglib目录下的channel.lib.php,请将以下代码全部复制替换上述文件:

$totalRow = $dsql->GetTotalRow();

}

if(is_array($dbrow)) $reid = $dbrow['reid'];

}

$dsql->Execute();

}else{

if( ($row['id']==$typeid || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' )

{

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">===[field:typename/]</a></li>

$reid = 0;

{

else if($type=="son")

}

[field:typename/]

$likeType = '';

$reid = $envs['reid'];

reset($dsql3);

$line = $row;

$GLOBALS['autoindex'] = 0;

if(ereg(':rel', $innertext)) $needRel = true;

if($innertext=='') $innertext = GetSysTemplets("channel_list.htm");

return $likeType;

{

{

$likeType = '';

$dtp2 = new DedeTagParse();

{

if($type=='top')

}

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

foreach($dtp2->CTags as $tagid=>$ctag){

}

if($reid==0 && $typeid>0)

if($cacheid !='') {

if($col>1) $likeType .= "<dd>\r\n";

$row['typelink'] = $row['typeurl'] = GetOneTypeUrlA($row);

//And id<>'$typeid'

{

if($col>1) $likeType .= "</dd>\r\n";

$dsql3 = clone $dsql2;

$dsql->SetQuery($sql);

$typeid = $envs['typeid'];

}

{

}

{

$likeType .= $linkOkstr;

$cacheid = trim($cacheid);

//检查是否有子栏目,并返回rel提示(用于二级菜单)

$row['typelink'] = GetOneTypeUrlA($row);

From dede_arctype where reid='$typeid' And ishidden<>1 order by sortrank asc limit 0,$row";

$dsql2->FreeResult();

$dtp2->Assign($tagid,lib_channel_son($ctag,$row['id'],$dsql2));

{

if($row=$dsql->GetArray())


$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description

[field:sonchannel3]

else $row['rel'] = " rel='dropmenu{$row['id']}'";

}//Loop Col

{

<li><a href=http://w2289556365/a/zhimengjiaocheng/development/"[field:typelink/]">===[field:typename/]</a></li>

From dede_arctype where reid='$typeid' And ishidden<>1 order by sortrank asc limit 0,$row";

//处理同级栏目中,当前栏目的样式

$topid = 0;

foreach($dtp2->CTags as $tagid=>$ctag){

if(is_array($dtp2->CTags))

if($likeType != '') return $likeType;

[field:sonchannel0]

}

for($j=0;$j<$col;$j++)

[field:sonchannel2]

}

{

{

if(empty($sql)) return '';

if($reid==0) {

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

$dsql2->Execute();

}

}

}//Loop Col


[/field:sonchannel2]

{

$dbrow = $dsql->GetOne("Select reid From dede_arctype where id='$typeid' ");

}

$dsql->SetQuery($sql);

{

elseif (preg_match('/^sonchannel[0-9]*$/',$ctag->GetName()))

if($type==''||$type=='sun') $type="son";

//And id<>'$typeid'

}

return $likeType;

{

{

if($row=$dsql2->GetArray())

From `dede_arctype` where reid='$reid' And ishidden<>1 order by sortrank asc limit 0,$row";

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://www.juheyunku.com/jz/dedecms/3616.shtml

相关文章

风云图片

推荐阅读

返回织梦cms频道首页