Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report