DEDECMS users may often feel that the official custom document attributes (recommended bit) are not enough. We will give you a detailed tutorial today.
The preceding figure shows the existing custom attributes in dedecms. The new version also adds a hotspot-focused attribute. The next step is to set a new custom document attribute for the SQL statement.
Based on the values (10, 'xinyi', 'new') in the preceding figure, we can explain that if there are nine of them, we can write 10. If the number is 11, 12 are written, and 'xinyi' is the keyword called in the template, and 'new' is selected in the add article.
The code is as follows: |
Copy code |
Set ('C', 'H', 'P', 'F', 'S', 'J', 'A', 'B', 'P ', 'j', 'R', 'By', 'zz ', 'wh', 'zl', 'SS', 'zl', 'SS', 'F ', 'rdgz ') |
Add all previously added attributes together and then append the keywords to be added this time.
An SQL statement is provided below
The code is as follows: |
Copy code |
Insert into 'dede _ arcatt' (sortid, att, attname) values (10, 'rdgz', 'hot topics '); Alter table 'dede _ Archives' modify 'flag' set ('C', 'H', 'P', 'F', 'S', 'J ', 'A', 'B', 'P', 'J', 'rdgz') default NULL; |