There are only 8 custom attributes for the article content of Zhimeng Dedecms by default. What can we do if we don't use them enough when making website calls? We need to add some flag attributes in the database to make separate calls.

 Methods for adding, modifying and deleting custom attributes of dream weaving Dedecms article content

1. Add custom attribute:

System ->SQL command line tool ->

Insert into ` dede_arcatt ` (sortid, att, attname) values (9,'d ',' channel slide ');
alter table `dede_archives` modify `flag` set ('c','h','p','f','s','j','a','b','d') default NULL;

Meaning: growth of "homepage header [x]" is personality

Note:

Line 1 of the code: values (9,'d ',' channel slide (new custom attribute) ') are self defined according to our needs, where 9 is the value of sortid, which is non repeatable, that is, every time a custom attribute is added, the value of sortid should be increased to 10,11,12..., and so on! D is the value of alt and the mark of custom attribute. It cannot be repeated with the existing mark symbol. The "channel slide" is a Chinese name, which is convenient for people to intuitively curb the meaning of custom attribute. It can be changed to "network", "news headlines", etc. as needed.

Line 2 of the code: set ('c ',' h ',' p ',' f ','s',' j ',' a ',' b ','d'). The letters in the brackets correspond to the existing marking symbols and the marking symbols to be added, and are entered in order. The order cannot be changed. For example, the 9th digit of d corresponds to the custom attribute "comment d" added in the first line of code.

2. To modify a custom attribute:

UPDATE `dede_arcatt` SET `attname` = '123' WHERE CONVERT( `dede_arcatt`.`att` USING utf8 ) = 's' LIMIT 1 ;

Meaning: change "scroll [s]" to "123"

3. To delete a custom attribute:

DELETE FROM ` dede_arcatt`WHERE CONVERT(dede_arcatt`,`att`USING utf8)+`x`LIMIT 1

Meaning: delete "homepage header [x]" as a personality

Post reply

Can't comment until