When using dede to build a site, you often need to call the latest article of the whole site. The methods described in this article are summarized as follows:
1. If you are calling the latest article of the whole site on the homepage, the tag is as follows:
| The code is as follows: |
Copy code |
{Dede: arclist row = 10} <A href = "[field: arcurl/]"> [field: title/] </a> {/Dede: arclist} |
2. If you call the latest dynamic route for CDN article on the channel page list page, the labels are as follows:
| The code is as follows: |
Copy code |
{Dede: arclist typeid = 'top' row = '10 '} <A href = "[field: arcurl/]"> [field: title/] </a> {/Dede: arclist} |
Add a typeid = 'top' attribute to the tag.
3. If you call the latest article on the content page, the tag is as follows:
Because if the content page is the latest article and you want to remove it from the latest article, you only need to change row = '10' to limit = '1, 10.
| The code is as follows: |
Copy code |
{Dede: arclist typeid = 'top' limit = '1, 10 '} <A href = "[field: arcurl/]"> [field: title/] </a> {/Dede: arclist} |