The condition is: ParentID equals 1 of all columns, I want to tune out, do not know how to write AH
I write this:
{pc:content action= "category" Parentid= "1" num= "siteid=" $siteid "order=" Listorder ASC "}
{Loop $data $r}
{$r [catname]}
{/loop}
{/PC}
I can't tune it out.
Reply to discussion (solution)
/** * Column label * @param $data */public function category ($data) {$data [' catid '] = intval ($data [' catid ']); $array = Array (); $sit Eid = $data [' SiteID '] && intval ($data [' SiteID '])? Intval ($data [' SiteID ']): Get_siteid (); $categorys = GetCache (' Category_content_ '. $siteid, ' Commons '); $site = Siteinfo ($siteid); $i = 1;foreach ($categorys as $catid + $cat) {if ($i > $data [' Limit ']) break;if ((! $cat [' Ismenu ']) | | SiteID && $cat [' SiteID ']!= $siteid) continue;if (Strpos ($cat [' url '], '://') = = = False) {$cat [' url '] = substr ($ site[' domain '],0,-1). $cat [' url '];} if ($cat [' ParentID ']== $data [' catid ']) {$array [$catid] = $cat; $i + +;}} return $array;}
From this tab implementation, there is no parentid parameter