Of course. Let's break down dede.field.body in detail. This is a fundamental concept for anyone working with the DedeCMS (织梦内容管理系统) templating engine.

What is dede.field.body?
In simple terms, dede.field.body is a DedeCMS template tag used to display the main content body of an article or a single piece of content.
Think of it as the placeholder in your HTML template where the actual article text (the content you write in the DedeCMS backend) will be inserted.
The Deeper Dive: How it Works
To fully understand dede.field.body, you need to understand the context in which it's used.
The DedeCMS Template Engine
DedeCMS uses a template engine that processes special tags to generate the final HTML page. These tags are enclosed in curly braces . The engine parses these tags, fetches the corresponding data from the database, and replaces the tag with that data.

The field Namespace
The tag dede.field.body uses the field namespace. This namespace is specifically used to access the fields of a single record (row) from the database.
When a user requests a single article page (e.g., article.php?id=123), DedeCMS queries the dede_archives table to get all the information for that specific article (ID 123). This information includes the title, author, publish date, and the content body, which is stored in a field, typically called body.
The Structure: dede.field.['FieldName']
dede: This is the namespace prefix for DedeCMS's default tags. It's a standard convention.field: This tells the engine you want to access a field from the currently loaded content record.body: This is the specific name of the database field you want to retrieve. For articles, this is almost always the field that holds the full content.
So, dede.field.body translates to: "From the current article's database record, get the value of the body field and display it here."
Practical Usage Examples
Let's see how you would use this in a real template file.

Scenario 1: Displaying the Full Content of an Article
This is the most common use case. You would typically find this inside a single article template file, which is often located at /templets/default/article_article.htm.
Example article_article.htm template:
<!DOCTYPE html>
<html>
<head>{dede:field.title/}</title>
</head>
<body>
<h1>{dede:field.title/}</h1>
<p class="info">
Author: {dede:field.writer/} |
Date: {dede:field.pubdate function="MyDate('Y-m-d', @me)"/}
</p>
<hr>
<!-- THIS IS WHERE THE ARTICLE CONTENT IS DISPLAYED -->
<div class="article-content">
{dede:field.body/}
</div>
<hr>
<!-- Other fields like tags, previous/next articles, etc. -->
<p>Tags: {dede:tag row='5' getall='1'} <a href="[field:link/]">[field:tag/]</a> {/dede:tag}</p>
</body>
</html>
When this template is processed, {dede:field.body/} will be replaced with the entire text, HTML, images, and any other content you wrote for that article in the DedeCMS admin panel.
Scenario 2: Using it with Other field Tags
You can mix and match field tags to display all the information associated with a single content item.
<h2>{dede:field.title/}</h2>
<div class="body">
{dede:field.body/}
</div>
<p>Source: <a href="{dede:field.source/}">{dede:field.source/}</a></p>
Advanced: The body Field and arclist Tag
It's crucial to understand that dede.field.body is used for displaying a single article's full content. It will not work as expected inside loops that display multiple articles, such as {dede:arclist}.
Inside {dede:arclist} (for displaying lists of articles):
If you try to use {dede:field.body/} inside an arclist loop, it will either be empty or cause an error because the arclist tag is designed to show a summary, not the full body.
For summaries in lists, you use different tags:
{dede:field.description/}: To display the article's summary (the "description" field).{dede:field.body function='cn_substr(@me, 200)'/}: To manually get the first 200 characters of the body field. This is a common technique for creating a "read more" effect.
Example of incorrect vs. correct usage:
Incorrect (for a list):
{dede:arclist titlelen='30' row='5'}
<h3><a href="[field:arcurl/]">[field:title/]</a></h3>
<!-- THIS WILL NOT WORK AS EXPECTED -->
{dede:field.body/}
{/dede:arclist}
Correct (for a list with a summary):
{dede:arclist titlelen='30' row='5'}
<h3><a href="[field:arcurl/]">[field:title/]</a></h3>
<!-- Use the description field or a substring of the body -->
[field:description/]
<p>{dede:field.body function='cn_substr(@me, 200)'}...</p>
<a href="[field:arcurl/]">Read More</a>
{/dede:arclist}
Summary
| Tag | Purpose | Context |
|---|---|---|
{dede:field.body/} |
Displays the full content body of a single article. | Used in single article templates (e.g., article_article.htm). |
{dede:field.description/} |
Displays the article summary. | Used in single article templates or list templates (arclist). |
{dede:field.title/} |
Displays the article title. | Used in both single article and list templates. |
[field:body/] |
A shorthand version, often used within loops like arclist or list. |
More common in list templates or when accessing fields from an array. |
In short, dede.field.body is your go-to tag for pulling the main content of a specific article into its dedicated display page.
