Dedecms5.7 cross column under what circumstances to use cross

In dedecms5.7, the cross-column cannot be realized by default, but there is such a function in the background, so how do we modify and realize the cross-column. And under what circumstances do we use cross columns.

First, let's first understand the concept of cross-column.

Cross-column refers to the situation where a large column and another non-lower sub-column cross, which is equivalent to the original sub-column function of the system, but it is now preset in the column.
For example: There are large columns on the website-smart phones, music phones, and another column-Nokia -> smart phones, Nokia -> music phones, so that the top large column and the
sub-column of another large column form a cross , So you only need to specify the crossed columns in the big column.
Note: The content of the cross-column will be automatically indexed, but the content of the sub-column of the cross-column will not be indexed. This application is also applicable to sites that divide information by region.

The concepts given by these official backends, knowing the concepts, can clearly know under what circumstances we should use them.

Second: Modify relevant documents to achieve cross-sections

Modified file: include/taglib/arclist.lib.php

Line 267:
if( ctag −> G et A tt (′ cross ′) = = ′ 1 ′) is changed to if (ctag->GetAtt('cross')=='1') is changed to if(c t a g ->GetAtt(cross)==1' )ChangedtoIF(ctag-> GetAtt (' Cross')! = '0')

第282行:
if($arr[‘crossid’]!=’’) KaTeX parse error: Expected '}', got 'EOF' at end of input: … WHERE id IN('{ arr[‘crossid’]}’) AND id<>’{ KaTeX parse error: Expected 'EOF', got '}' at position 7: typeid}̲' AND topid<>'{ typeid}’ ";
改成
if($arr[‘crossid’]!=’’) KaTeX parse error: Expected '}', got 'EOF' at end of input: …` WHERE id IN({ arr[‘crossid’]}) AND id<>’{ KaTeX parse error: Expected 'EOF', got '}' at position 7: typeid}̲' AND topid<>'{ typeid}’ ";

The background is set in the background column to be crossed, and the related column list is generated. Then we can see the effect we want. The flexible use of the cross column can help us achieve the special effects we want. But at the same time, it's best not to use it if it can be used, and there will be some unexpected troubles later.

Guess you like

Origin blog.csdn.net/a9490489/article/details/103910221