In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to set up the dynamic browsing of dedecms single-table model, which can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
How to set the dynamic browsing of dedecms single table model?
Arclistsg tag, document list invocation tag for single table independent model
Method 1:
In the use of the arclist tag, there is a field ismake field in the main table dede_archives. We should know that the value of-1 is dynamic, and our method is to imitate this.
For the creation of a single table model, there is no ismake field by default, because we manually create an ismake field and set it to pass a value of-1.
Note: when you create a model, you can add an ismake field. If not, you can add it directly to the corresponding table and add the ismake field to the listfields in the dede_ channel type table to add the query field. If the last step is over and it doesn't work, you can query whether listfields has ismake.
Modify the source code:
First, in the arclistsg source code, about 264 lines, find $row ['arcurl'] this, GetFileUrl () [this function is in helpers/channelunit.helper.php], which is used to obtain the url address, in which there is an ismake parameter. If you are interested, you can take a look at this function.
Our goal is to change 1 [$row [1] after 'title'] in the GetFileUrl () parameter to $row [' ismake'].
Note: if you only need the arclistsg tag to display the dynamic, then this step is fine.
Second, modify arc.sglistview.class.php, about 760 lines, and comment out $row ['ismake'] = 1; comment out the following lines, $row [' arcurl'] = GetFileUrl () has the same code as in the first step, and change it to the same as in the first step.
At this point, you can basically achieve dynamic browsing, but when you add or modify, you will still generate a html file, which will correspond to the code comments that the release program or modification program will generate html.
Method 2:
In fact, it is the same as method 1. If you do not want to establish the ismake field, just change the corresponding local method to-1, but the compatibility is not very good.
Thank you for reading this article carefully. I hope the editor will share the dedecms single table model and how to set up the content dynamically. At the same time, I also hope you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
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.