Of course. "Dede sglist" is a term you'll find within the context of the DedeCMS (织梦CMS) content management system.

Here’s a detailed breakdown of what it is, how it works, and how to use it.
What is dede_sglist?
In short, dede_sglist is a DedeCMS template tag used to display a list of articles from a specific secondary channel (also known as a sub-channel or "栏目").
Let's break that down:
dede: This is the standard prefix for all DedeCMS template tags. It stands for "DedeCMS".sglist: This is the specific tag name.sgis short for "二级栏目", which means "secondary channel" or "sub-channel".listindicates that its function is to output a list of content.
This tag is most commonly used in the template of a parent channel to automatically list all the articles belonging to its child channels.

How it Works
The dede_sglist tag queries the database for all articles that are categorized under the child channels of the channel you are currently viewing. It then formats and displays these articles according to the parameters you provide in the tag.
Basic Syntax
The tag has a simple structure:
{dede:sglist}
<!-- HTML and other Dede tags to display each item in the list -->
{/dede:sglist}
This is a loop tag. Everything between {dede:sglist} and {/dede:sglist} will be repeated for every article found in the sub-channels.
Commonly Used Attributes (Parameters)
You can customize the behavior of sglist by adding attributes inside the opening tag. Here are the most important ones:

| Attribute | Description | Example |
|---|---|---|
typeid |
(Optional) The ID of the parent channel whose sub-channels you want to list from. If not specified, it defaults to the current channel's ID. | typeid='2' |
row |
(Optional) The number of articles to display. | row='10' |
col |
(Optional) The number of columns to display the articles in (for a grid layout). | col='2' |
infolen |
(Optional) The maximum length of the article summary (in characters). | infolen='100' |
imgwidth |
(Optional) The width of the thumbnail image. | imgwidth='120' |
imgheight |
(Optional) The height of the thumbnail image. | imgheight='90' |
orderby |
(Optional) The order in which to display the articles. Common values: pubdate (publish date), click (click count), id. |
orderby='pubdate' |
orderway |
(Optional) The sort direction. desc for descending, asc for ascending. |
orderway='desc' |
Practical Example
Let's imagine you have a website with the following channel structure:
- News (ID: 1) - This is a Parent Channel
- Technology News (ID: 3)
- Sports News (ID: 4)
- Entertainment News (ID: 5)
You want to create a template for the "News" page (channel ID 1) that shows the latest articles from all its sub-channels.
You would place the following code in the list_article.htm template file for the "News" channel:
<h2>Latest News from All Categories</h2>
{dede:sglist typeid='1' row='8' titlelen='40' orderby='pubdate' orderway='desc'}
<div class="news-item">
<!-- Display the article's thumbnail if it exists -->
<a href="[field:arcurl/]">
<img src="[field:litpic/]" alt="[field:title/]" width="100" height="75" />
</a>
<!-- Display the article title linked to its full page -->
<h3><a href="[field:arcurl/]">[field:title/]</a></h3>
<!-- Display a short summary of the article -->
<p>[field:info/]...</p>
<!-- Display the publish date -->
<small>Published on: [field:pubdate function="MyDate('Y-m-d',@me)"/]</small>
</div>
{/dede:sglist}
Explanation of the fields used inside the loop:
[field:arcurl/]: The full URL to the article.[field:litpic/]: The URL of the thumbnail image.- `[field:title/]: The title of the article.
[field:info/]: The summary or description of the article.[field:pubdate/]: The publication date of the article. We've used a function to format it.
Important Notes and Troubleshooting
- Parent Channel Only:
dede:sglistonly works on parent channels that have sub-channels. If you use it on a channel that has no children, it will output nothing. - Template File: This tag is typically used in
list_*.htmtemplate files (for channel list pages) orindex.htm(for the homepage, if it's set up to show a parent channel). - Caching: DedeCMS uses caching. If you make changes to the tag or the channel structure, you might need to clear the cache (in the DedeCMS backend -> System -> Cache Settings) to see the changes immediately.
- Alternative Tag: There is a similar tag called
{dede:channelartlist}. This is more commonly used for creating a list of channels themselves (e.g., "Technology News", "Sports News") and then another loop inside to show articles from that specific channel.sglistis more direct for just getting all articles from child channels of the current one.
