Home >CMS Tutorial >DEDECMS >How does dedecms make mytypeid of likearticle support multiple columns and sub-columns?
dedecmsHow to make likearticle's mytypeid support multiple columns and sub-columns?
When using dede:likearticle, if you want to obtain related articles under multiple specified columns, and there happen to be sub-columns under these multiple columns, the official program cannot meet your needs. , you need to change it
Recommended learning:梦weavercms
Open \include\taglib\likearticle.lib.php and find
if( !empty($typeid) && !preg_match('#,#', $typeid) ) { $typeid = GetSonIds($typeid); }
in it Join
else { $typeids = explode(',', $typeid); foreach($typeids as $ttid) { $typeidss[] = GetSonIds($ttid); } $typeidStr = join(',', $typeidss); $typeidss = explode(',', $typeidStr); $typeidssok = array_unique($typeidss); $typeid = join(',', $typeidssok); }below
The above is the detailed content of How does dedecms make mytypeid of likearticle support multiple columns and sub-columns?. For more information, please follow other related articles on the PHP Chinese website!