The first, directly write the sub-column ID, with Cat in
{pc:get sql= "select * from V9_news where status=99 and CatID in (21,22,23,24,25) Order by ID DESC" num= "7" return= "Data"} {Loop $data $r} <li><a href= "{$r [url]}" title= "{$r [title]}" target= "_blank" >{str_cut ($r [' title '],40)} ({D Ate (' m-d ', $r [Inputtime])}) </SPAN></A></LI>{/LOOP}{/PC}
The benefits of this approach: You can customize the column you want to take
Disadvantage: To write more than one ID, the background added to the column, the ID will be written in
The second, according to the parent column ID, such as the above 21,22,23,24,25 are 15 below the sub-column, you can write:
{loop subcat ($k) $v} {php $subcatid [] = $k;} {/loop} {php $subcatid = implode (', ', $subcatid);} {pc:get sql= "select * from V9_news where status=99 and CatID in ($subcatid) Order by ID DESC" num= "7" return= "Data"} {Loop $data $r} <li><span><strong><a href= "{$CATEGORYS [$r [Catid]][url]}" >[{$CATEGORYS [$r [C Atid]][catname]}]</a><a href= "{$r [url]}" title= "{$r [title]}" target= "_blank" >{str_cut ($r [' title '],40) }</a></strong><em>[{date (' y-m-d ', $r [inputtime])}]</em></span></li>{/loop}{ /PC}
Benefits: Just write a parent column ID, automatically take the subordinate sub-column ID
Disadvantage: The circular parent column under all the sub-column ID, if the content of a sub-column does not want to display, not good implementation
Phpcms V9 Two ways to invoke articles under multiple columns