search
HomeCMS TutorialDEDECMSHow to call the specified column content on the DreamWeaver homepage

How to call the specified column content on the DreamWeaver homepage

How to call the specified column content on the Dreamweaver homepage?

We know that Dedecms is very simple to develop, but the global variables of Dedecms have byte limits, which prevents us from calling large sections of content on the homepage through tags, especially content that contains html tags, but dedecms has another way to call large sections of content, which is to call saved html content through sql statements.

Recommended study: 梦Weavercms

For example, a general corporate website will have a company profile column. Most of us use the {field:content /} tag for this column. to call the column content in the column settings, but this field cannot be used on the home page.

In fact, you can write a sql statement to call the column content on the homepage:

{dede:sql sql='Select content from dede_arctype where id=2'}
[field:content /]
{/dede:sql}

Note that you need to manually modify the data prefix dede_

If the ID of the introduction column is 2, you can Use the above method to call up all company profiles.

If you think there is too much content, we can intercept part of it. The specific sql statement is as follows:

{dede:sql sql='Select content from dede_arctype where id=2'}
[field:contentfunction="cn_substr('@me',200)" /]
{/dede:sql}

The above means that the column content with column ID 2 is called, and only the length of 200 bytes is called.

How about it? Isn’t it very simple? Isn’t it much easier to call the column content on the homepage in the future?

The above is the detailed content of How to call the specified column content on the DreamWeaver homepage. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools