In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to add custom attributes to dede. I hope you will gain a lot after reading this article. Let's discuss it together.
How does dede add custom attributes?
The good use of custom attributes can completely solve the problem that an article belongs to multiple columns, or there are 2-3 sub-columns under the column.
Environment: at present, DEDE has been updated to version 5.7. the previous version is not covered, and we use DEDE5.7 as the basis for modification.
First, let's take a look at how to add custom article properties in bulk.
The safer and faster way to add is through SQL writing: background-system-SQL command line tool.
Insert into `dede_ Arcatt` (sortid,att,attname) values (9 dede_ archives` modify `label'); default NULL ('clockwise modify `labeling') default NULL
Here we need to say that because DEDE itself already has eight default properties, we start with the ninth column, and so on. "d" is the tag that distinguishes our foreground from calling through flag='d', as long as it is not repeated.
The above is that we add an attribute, if we have a lot of attributes to replace the second-and third-level columns, what to do? Look directly at the strength.
Insert into `dede_ Arcatt` (sortid,att,attname) values (9 insert into dede_ arcatt` (sortid,att,attname) values); insert into `dede_ arcatt` (sortid,att,attname) values (9) Alter table `dede_ archives` modify `set (default NULL)
Through this method, we can completely solve the problem of adding article attributes in batches!
We can see that this is the effect of our batch addition, but have you found that the added attributes have been mixed with the previous ones, and it will be troublesome for editors to add them? here's a tip:
We add a no attribute tag in front of the default attribute tag and the attribute tag that needs to be added! Then we tampered with the tag through the database.
After reading this article, I believe you have a certain understanding of the method of adding custom properties to dede. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.