Dedecms: Weaving dream Article How to add a Custom Properties tab (SQL command-line tools)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.