Home >CMS Tutorial >DEDECMS >How does dedecms make mytypeid of likearticle support multiple columns and sub-columns?

How does dedecms make mytypeid of likearticle support multiple columns and sub-columns?

藏色散人
藏色散人Original
2019-12-14 09:38:362647browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn