List Page Modifications:
Add a label to the list_article.htm page [field:typeid2llink/] to get the secondary column connection.
Modify the include/arc.listview.class.php file and add it below 875 lines:
The code is as follows |
Copy Code |
$ks = Split (', ', $row [' Typeid2 ']);
$type 2name= ""; foreach ($ks as $k) { $k = Trim ($k); if ($k!= "") { if ($rows = $this->dsql->getone ("Select *,id as Id1 from ' #@__arctype ' where id=". $k)) { $type _path=gettypeurl ($rows [' Id1 '],mftypedir ($rows [' Typedir ']), $rows [' IsDefault '], $rows [' DefaultName '], $rows [' Ispart '], $rows [' Namerule2 '], $rows [' SiteURL ']); $type 2name.= "<a href=". $type _path. "' target=_blank> '. $rows [' TypeName ']." </a> "; } } } $row [' Typeid2llink '] =substr ($type 2name,0,strlen ($type 2name)-1); |
OK, the list page can be displayed.
Content Page Modification:
Add a label {dede:field.typeid2llink/} to the article_article.htm page to get the secondary column connection.
Modify the include/arc.archives.class.php file and add it after line 125:
The code is as follows |
Copy Code |
$ks = Split (', ', $this->fields[' Typeid2 '));
$type 2name= ""; foreach ($ks as $k) { $k = Trim ($k); if ($k!= "") { if ($rowa = $this->dsql->getone ("Select *,id as Id1 from ' #@__arctype ' where id=". $k)) { $type _path=gettypeurl ($rowa [' Id1 '],mftypedir ($rowa [' Typedir ']), $rowa [' IsDefault '], $rowa [' DefaultName '], $rowa [' Ispart '], $rowa [' Namerule2 '], $rowa [' SiteURL ']); $type 2name.= "<a href=". $type _path. "' target=_blank> '. $rowa [' TypeName ']." </a> "; } } } $this->fields[' Typeid2llink '] =substr ($type 2name,0,strlen ($type 2name)-1); |
OK, the content page can show the
For DEDECMS modified also relatively simple, many features may not be as everyone else, we can handle, but if you want to upgrade, your custom function may be gone, we need to pay attention.