Dedecms column Custom field addition

Source: Internet
Author: User

Files used:

Catalog_add.htm path: \ Dede \ templets \

Catalog_edit.htm path: \ Dede \ templets \

Catalog_add.php path: \ Dede \

Catalog_edit.php path: \ Dede \

1. Open the database and find the dede_arctype table. Add the Custom Field name at the end of the table:

Open the catalog_add.htm file first and add the edit box of our custom columns in a place that you think is good. For example, here is my own place (added in the advanced settings of the topic, below the topic description:

Next, open the next file: The same catalog_edit.htm method, and add the content above at the same location of the file,

Okay. The above two steps show that the setting of the static page is complete. The following are the last two PHP files modified to perform operations on the data going to the database, that is the most important step for customizing fields in our topic! Let's get started !!!

Open the catalog_add.php file as follows:

We add the "bzf" of our custom field to the end of the insert into statement,

After adding it, let's go down, as shown below:

After the file is added, modify the next file.

Open the file: catalog_edit.php

Now, we have added our custom fields. How can we call them?

The call method is as follows:

{Dede: field. bzf /}

 

 

After adding our field names, we will be able to complete the big work. Let's test it;

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.