1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <divclass= "sae_gl" > <?php $bclassid = $GLOBALS [navclassid]; //取得本栏目id //取得本栏目下的子栏目 ?> [e:loop={ "selectclassid,classname,classpathfrom`[!db.pre!]enewsclass`wherebclassid='$bclassid'orderby`classid`desc" ,7,24,0}] <?php //这里是取得该分类下的有图片的最新数据 $commbook = $empire ->fetch1( "selecttitle,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,idfromphome_ecms_newswhereclassid=" . $bqr [classid]. "andtitlepic!=''orderbynewstimedesclimit1" ); $commbookurl =sys_ReturnBqTitleLink( $commbook ); ?> <divclass= "gl_01" <?php $i ++; if ( $i %2==0){ echo 'id="gl_01"' ;}?>> <olclass= "gl_c" ><h3><?= $bqr [classname]?></h3><arel= "nofollow noopener noreferrer" href= "<?=$public_r[newsurl].$bqr[classpath]?>" >更多>></a></ol> <divclass= "yd" > <dl> <dt><arel= "nofollow noopener noreferrer" href= "<?=$commbookurl?>" ><imgsrc= "<?=$commbook[titlepic]?>" width= "108px" height= "85px" /></a></dt> <dd><b><arel= "nofollow noopener noreferrer" href= "<?=$commbookurl?>" ><?= $commbook [title]?></a></b><aclass= "uus" rel= "nofollow noopener noreferrer" href= "#" ><?=esub( $commbook [smalltext],84)?></a></dd> </dl> <olclass= "ga_ic" > <?php //取得该分类下的最新数据 $newbook = $empire ->query( "selecttitle,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,idfromphome_ecms_newswhereclassid=" . $bqr [classid]. "orderbynewstimedesclimit5" ); while ( $r = $empire ->fetch( $newbook )){ ?> <li><arel= "nofollow noopener noreferrer" href= "<?=sys_ReturnBqTitleLink($r)?>" title= "<?=$r[title]?>" >·<?= $r [title]?></a><spanclass= "riq" ><?= date ( 'Y-m-d' , $r [newstime])?></span></li> <?php } //显示5条 ?> </ol> </div> <divclass= "bj_t" ></div> </div> [/e:loop] </div> |
本文灵动标签如何实现循环子栏目数据——如何实现 循环子栏目数据标签 (LISTSONCLASS)的效果到此结束。人生不要被过去所控制,决定你前行的,是未来。小编再次感谢大家对我们的支持!