Of course. Let's break down the noflag parameter in the DedeCMS (dedecms) {dede:list} tag.

What is {dede:list}?
First, it's important to understand what {dede:list} does. It's a core DedeCMS tag used to list articles or other documents from a specific channel or category. It's typically used in templates to generate a list of articles, for example, on a category page, an archive page, or a search results page.
The basic syntax is:
{dede:list row='10' titlelen='40' orderby='default'}
<li>
<a href='[field:arcurl/]'>[field:title/]</a>
<span>[field:pubdate function="MyDate('Y-m-d',@me)"/]</span>
</li>
{/dede:list}
row: The number of articles to display.len`: The length of the title to display.orderby: The order of articles (e.g.,pubdatefor publish date,hotfor hits,sortrankfor manual sorting).
What is the noflag Parameter?
The flag parameter in DedeCMS is a powerful feature used to mark an article with one or more special statuses or attributes. These flags are stored in the flag field of the dede_archives table as a sum of binary values.
Common flags include:

c: Recommended (推荐)h: Headline (头条)p: Picture (图文)s: Special (专题)j: Jump (跳转)a: Article (普通文章)b: Bold (加粗)
By default, when you use {dede:list}, it will fetch all articles, regardless of their flags. This is where noflag becomes useful.
The noflag parameter is a filter that tells DedeCMS to exclude articles that have any of the specified flags.
How to Use noflag
You add the noflag parameter directly inside the {dede:list} opening tag.
Syntax:
{dede:list row='10' titlelen='40' noflag='chp'}
<!-- Your list item template here -->
{/dede:list}
In this example, noflag='chp' means: "Do not show articles that have the 'c' (Recommended), 'h' (Headline), or 'p' (Picture) flags."

Practical Examples
Let's imagine you have a website with different types of content. You want to create a clean, simple list of "standard" articles, excluding any special or featured content.
Example 1: Excluding Recommended and Headline Articles
You want to list articles but exclude those marked as "Recommended" (c) or "Headline" (h).
<h2>Latest Standard Articles</h2>
<ul>
{dede:list row='8' orderby='pubdate' noflag='ch'}
<li>
<a href="[field:arcurl/]" title="[field:title/]">[field:title/]</a>
<span class="date">[field:pubdate function="MyDate('Y-m-d',@me)"]</span>
</li>
{/dede:list}
</ul>
What this does: It will display the 8 most recently published articles that are not flagged as Recommended or Headline.
Example 2: Excluding Only Jump Articles
Sometimes, articles with the jump flag (j) are external links and you don't want them in your regular article lists.
<h2>Our Internal Articles</h2>
<ul>
{dede:list row='15' noflag='j'}
<li>
<a href="[field:arcurl/]">[field:title/]</a>
</li>
{/dede:list}
</ul>
What this does: It will list 15 articles, ensuring that any article marked as a "Jump" link is excluded from the results.
Example 3: Using flag vs. noflag for Comparison
To better understand the difference, let's look at the opposite: the flag parameter.
-
flag: To show articles that have at least one of the specified flags.{dede:list flag='c'}: Shows only articles that are Recommended.{dede:list flag='ch'}: Shows articles that are either Recommended or Headline.
-
noflag: To show articles that have none of the specified flags.{dede:list noflag='c'}: Shows all articles except those that are Recommended.{dede:list noflag='ch'}: Shows all articles except those that are Recommended or Headline.
Important Considerations
- Case-Insensitive: The flag letters (
c,h,p) are case-insensitive, but the convention is to use lowercase. - Combination with Other Parameters: You can use
noflagalongside other parameters likerow,orderby, andtypeid.{dede:list typeid='5' row='5' orderby='hot' noflag='c'}This would list the 5 most popular (
orderby='hot') articles from category ID 5, excluding any that are recommended (noflag='c'). - Performance: For very large sites with thousands of articles, using complex
flagornoflagfilters can have a minor impact on query performance. However, for most standard websites, the impact is negligible.
Summary
| Parameter | Purpose | Example |
|---|---|---|
flag |
Includes articles that have at least one of the specified flags. | {dede:list flag='c'} (Shows only Recommended articles) |
noflag |
Excludes articles that have any of the specified flags. | {dede:list noflag='c'} (Shows all articles except Recommended ones) |
In short, noflag is your go-to parameter when you want to create a "clean" list of articles by filtering out special or promoted content.
