Home >CMS Tutorial >Empire CMS >How to obtain sub-columns in Empire CMS
How does Empire CMS obtain sub-columns?
The example in this article describes the method of Imperial CMS to obtain the sub-column under the current column. Share it with everyone for your reference. The specific implementation method is as follows:
It is recommended to study "Empire cms tutorial"
Empire CMS obtains the sub-column under the current column
The code is as follows:
<?php $bclassid=$GLOBALS[navclassid]; //取得本栏目id //取得本栏目下的子栏目 ?> [e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` desc ",5,24,0,0,0}]
Add the sub-column information you want to cycle here
Sub-column name:
The code is as follows:
<?=$class_r[$bqr[classid]]['classname']?>
Sub-column link:
Code As follows:
<?=$class_r[$bqr[classid]]['classpath']?>
Sub-column id:$bqr[classid]
Tag call information:
The code is as follows:
[ecmsinfo] $bqr[classid] ,8,12,0,0,15,0,0,0[/ecmsinfo]
Empire CMS content page gets the current The column ID and parent column ID
code is as follows:
<?php $cid = $navinfor['classid']; $fid = $class_r[$cid]['bclassid']; ?>
The above is the detailed content of How to obtain sub-columns in Empire CMS. For more information, please follow other related articles on the PHP Chinese website!