In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how dedecms calls the content of the single-page column to the front page. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
How does dedecms call the content of a single page column to the home page?
The commonly used single page content that needs to be transferred to the home page, such as company profile, contact us, etc., we may have to show it on the home page. Through the conventional way, including access to the official dede forum materials, can not find a more appropriate answer. Today we will provide two ways to make calls.
First, we know that the template call tag for a single page of content is {dede:field.content/}. After experiments, it is used on the home page.
The code is as follows:
{dede:channelartlist} {dede:field.content/} {/ dede:channelartlist}
Call, you can call up the relevant data smoothly.
However, there is a problem, this call can only be used in the case of only one single page, if the system contains two or more single pages, the call will stack all the single page content. It doesn't work even if you add type's ID to qualify. So this method is not very suitable.
Second, we can also use SQL to make calls, which makes it much more flexible and can call the single-page content of any column ID.
The code is as follows:
{dede:sql sql='Select content from dede_arctype where id=1'} [field:content/] {/ dede:sql}
If you want to call that column, you only need to change the ID of the column, but it is important to note that the "dede_arctype" table name should be filled in according to the table name when you installed the system.
About how dedecms calls single-page column content to the home page to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.