Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of adding parent column call and multi-level support for currentstyle in Weaving Dream DEDECMS

Shulou Source: shulou.com Published: 2022-06-02 03:35:54 09月18日 Update

Editor to share with you how to add parent column calls and multi-level support for currentstyle in Weaving Dream DEDECMS. I hope you will gain a lot after reading this article. Let's discuss it together.

How to add parent column call and multi-level support currentstyle in Weaving Dream DEDECMS?

\ include\ inc_typelink.php

1. After this code (about 263 lines)

If ($reID==0 & & $typeid > 0) {$dbrow = $this- > dsql- > GetOne ("Select reID From dede_arctype where ID='$typeid'"); if (is_array ($dbrow)) $reID= $dbrow ['reID'];}

Increase

/ / add code if ($reID > 0) {$dbrow = $this- > dsql- > GetOne ("Select reID From dede_arctype where ID='$reID'"); if (is_array ($dbrow)) $parentID = $dbrow ['reID'];} / / end of new code

2. Then after the following code:

Else if ($typetype== "self") {$sql = "Select ID,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl From dede_arctype where reID='$reID' And ishidden1 order by sortrank asc limit 0jurisdiction row";}

Increase

Else if ($typetype== "parent") {/ / the new code gets the superior column $sql = "Select ID,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl From dede_arctype where reID='$parentID' And ishidden1 order by sortrank asc limit 0justice column";} / / get the superior column at the end of the new code

3. Modify the following code

If ($row ['ID'] = = "$typeid" & & $myinnertext! ='') {

Modified to:

If (($row ['ID'] = = "$typeid" | | $row [' ID'] = = "$reID" | | $row ['ID'] = = "$parentID") & & $myinnertext! ='') {

After three steps of modification

Two functions can be achieved:

1. Call the parent column (superior), which is useful for columns that are too deeply graded.

Methods:

{dede:channel type='parent'} {dede:channel}

2, you can call currentstyle, for the column classification is too deep, but also want to change the current column style is very useful!

After reading this article, I believe you have a certain understanding of the method of adding parent column calls and multi-level support for currentstyle in Weaving Dream DEDECMS. If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!

Tags: Columns codes methods support superiors useful articles too deep functional finished more styles steps knowledge industry information information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple NVidia MySQL OPPO Reno Shulou Information