How to Use dede to create a single page for an enterprise and call the single page content

Source: Internet
Author: User

Should many webmasters be familiar with dede? It is a system constructed by open-source php programs. Dede is short for dedecms and is also the most popular php cms system. dede has been developing for several years and is very useful in terms of functionality and practicality. Many webmasters use dedecms because it is simple.

How to call a single page on the home page

1. implementation Method: {dede: global runphp = "yes"} global $ dsql; $ row = $ dsql-> getOne ("select content from dede_arctype where id = 8 "); @ me = $ row ["content"]; {/dede: global} arctype: dede_arctype, column table in the database; content: field name of the content to be displayed in the database;

2. When we create a corporate website, we need to use a lot of single pages, such as contact information, enterprise profile, and some case studies, which may all use single pages. However, weimeng programs tend to be information-type websites, which cannot be used normally. Therefore, we need to modify some column pages to make them a single page.

However, static changes can only be static and cannot be dynamically updated. This method is not very good. A dynamic page is required, but the dynamic page creation on a single page is different from the static one. Perform the following two steps:

Step 1: we need to set related columns when creating columns. The first is the regular option: the general options do not need to be changed much. In addition to the topic title and path, you can choose not to change the other options. In this case, pay attention to the selection of column attributes.

As shown in, selecting a single page is not allowed to post articles. Therefore, you can select the channel cover for more convenient viewing in future updates. In fact, this is not very important. After performing the operations shown in the figure, perform the second step.

For a single page, we need to customize a page, because the default template does not support single page. Assume that we use danye.htmto implement single-page calling. In this case, we will choose the danye.htm template in the advanced section. If you select the channel cover in the general options, modify the channel cover (modify the cover template below). Otherwise, modify the list template in the final column list. Taking "channel cover" as an example,

The content of the topic is shown in. We can see that the content of the dedeCMS prompt is replaced, and the original independent page is more flexible to call the template. You can use {dede: field in the topic template. content/} calls are usually used on a single enterprise page, instead of changing static pages.

Then modify the singlepage.htm template.

To modify a template, you only need to find the corresponding template singlepage. hem under the templets path. You can use dreamweaver8 to edit and modify the template. The original call is {dede: field. body/}. We only need to replace it with {dede: field. content. This tutorial is provided by: Wenzhou decoration company http://www.wzlz.cn

Related Article

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.