This section describes how to add a custom property, as shown in figure.
Log on to the background management system of zhimeng content management system, and click system> SQL command line tool. For details, see:
Then execute the following SQL statements respectively.
Insert into dede_arcatt (sortid, ATT, attname) values ('9', 'D', 'hot recommend ');
View code
alter table `dede_archives` modify `flag` set (‘h‘,‘c‘,‘p‘,‘f‘,‘s‘,‘j‘,‘a‘,‘b‘,‘bj‘) default NULL;
View code
If you log on to the database, you can see the following information in the dede_arcatt table:
In the table structure of the dede_archives table, the flag field contains the following information:
In this way, the custom attributes are basically complete. After you log on to the background management system of the zhimeng Content Management System and add a document in the channel column, you will see the newly added attributes, as shown in
The defined attributes can be called in the template. The call code is as follows:
<Ul class = "C1 ico1"> <! -- Hot recommendation --> {Dede: arclist flag = 'D' ROW = '13' titlelen = '60' orderby = 'pubdate'} <li> <a href = "[field: arcurl/] "> <font color = '# ff0000'> [field: Title/] </font> </a> </Li >{/ Dede: arclist} <! -- // Hot recommendation --> </ul>
Display Effect,
Website: www. it002.com