1. Implementation method: {dede: globalrunphp = "yes"} global $ dsql; $ row = $ dsql-& gt; get one(" select content from dede _ arctype where id = 8 "); @ me = $ row[" content "]; {/dede: global} arctype: dede _ arctype, a list in the database; Content: the field name of the content to be displayed in the database;
2. There are many single pages to be used in making an enterprise website, such as contact information, enterprise profile, and some case shows, all of which may use the content of a single page. However, Dream Weaving Project is an information-oriented website, so it is impossible for us to use it normally. Therefore, we need to change some column pages to make them single pages.
But after static change, it can only be static, and it can't be updated dynamically, which is not good. Then you need to make a dynamic page, but the dynamic page making of a single page is different from the static one. Two steps need to be taken:
Step 1: We need to set it when building the column. First of all, the general options: the general options don't change much, except the column title and path, others can be completely unchanged. At this time, we should pay attention to the selection of column attributes.
Choosing a single page is not allowed to publish articles, so choose the channel cover, which can be seen more conveniently when updating in the future. Actually, this is not critical. After following the diagram, proceed to the second step. For a single page, we need to customize a page, because the default template does not support single pages. Suppose we use danye.htm to call a single page, then we will choose danye.htm as the template in the advanced options. If the channel cover is selected in the general options, modify the channel cover (modify the cover template below), otherwise the list template should be modified for the final column list. Take the "channel cover" as an example, and finally the column content, as shown above. We see the content substitution prompted by dedeCMS, which makes the original single page more flexible to call the template. You can use {dede:field.content/} to call in a column template, which is usually used in an enterprise single page without changing the static page. Then modify the singlepage.htm template.
To modify the template, just find the corresponding template singlepage.hem in the templates path, and you can edit and modify it with dreamweaver8.