Home > CMS Tutorial > DEDECMS > body text

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

藏色散人
Release: 2019-12-14 09:38:36
Original
2566 people have browsed it

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);
}
Copy after login

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);
}
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!