Dede Weaving dreams How to add the custom properties tab symptoms
1, into the background-system--sql command-line tool-run the SQL command line, add Arcatt table field:
Insert INTO ' Dede_arcatt ' (sortid,att,attname) VALUES (9, ' d ', ' symptoms ')
2. Add Archives table field:
ALTER TABLE ' dede_archives ' modify ' flag ' Set (' H ', ' C ', ' P ', ' f ', ' s ', ' j ', ' A ', ' B ', ' d ') default NULL
Looking at the bold SQL instructions, the name is to insert a new record in the table (the property to add), and then modify the flag field of the other associated table to add the label D. Yes, that's it. You have successfully added a new property and can call the template. Of course you can also add properties using the phpMyAdmin database tool as an idiot.
It should be stated that:
Code line 1th: Values (9, ' d ', ' new custom properties ') are defined according to our own needs, where 9 is the value of SortID, is not repeatable, that is, each add a custom attribute, SortID value should be incremented to 10,11,12 ..., and so on! D is the value of ALT, is the tag of the custom attribute, and the existing marker symbol can not be duplicated, "symptom" is the Chinese name, is convenient for people to intuitively recall the meaning of custom attributes, can be changed to other names as needed, does not affect the call.
Code line 2nd: Set (' C ', ' H ', ' P ', ' f ', ' s ', ' j ', ' A ', ' B ', ' d '), the letters in parentheses correspond to existing marker symbols and the marker symbols you need to add, and enter them sequentially, and not change the order. For example, D sorts 9th bits, which corresponds to the custom attribute "Comment D" added in the first line of code.
2, backstage--template--Default template management--index.htm
Modify in "index.htm" to add code where symptoms need to be called "{dede:arclist flag= ' d ' limit= ' 0,1 ' infolen= ' 230 '}"
3, add the document, in the custom properties of the "New Custom properties" Check, can be implemented, the selected document appears on the first page, to check the current inside pages.
To delete a custom attribute:
DELETE from Dede_arcatt WHERE sortid= ' 9 '
Dedecms: Weaving dream Article How to add a Custom Properties tab (SQL command-line tools)