The dede homepage calls the {dedefield. content} method of the topic content, and the dede homepage calls the content

Source: Internet
Author: User

The dede homepage calls the {dedefield. content} method of the topic content, and the dede homepage calls the content

Dedecms has powerful functions, but the global variables of dedecms have byte restrictions, which makes it impossible for the homepage to call the enterprise site of a large segment when we use dedecms to create an enterprise site.

In fact, dedecms also has another method to call large sections of content. here we need to use SQL statements to call the saved html content.

Generally, the enterprise site has a column about the Enterprise. Most of the topics use the {field: content/} method to call the content of the column settings, however, this field is unavailable on the homepage. In fact, you can write an SQL statement to call {field: content/} on the homepage:

{Dede: SQL = 'select content from sh_arctype where id = 20'} [field: content/]

{/Dede: SQL}

If the topic ID is 20, you can use the above method to call all the enterprise profiles.

If you think there is too much content, we can take part of it.

{Dede: SQL = 'select content from sh_arctype where id = 20'} [field: contentfunction = "cn_substr ('@ me', 200)"/]

{/Dede: SQL}

The above indicates that the content of the topic with the ID of 20 is called, and only the length of 200 bytes is called.

This method can be used to call the content of a single-page column, such as an enterprise profile, on the homepage.

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.