Home >Backend Development >PHP Tutorial >Freely control the number of articles displayed on the MT homepage_PHP tutorial

Freely control the number of articles displayed on the MT homepage_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:32:301153browse

In the MT Blog system, the home page of a blog that is updated frequently will often display many article entries, and the page will be very long; for a blog that is not updated frequently, when the blog is updated occasionally, you will find that only one article is displayed, and the side navigation is not displayed. The articles are extremely disproportionate. In fact, as long as you simply set some parameters in the Index template, you can freely control the number of articles displayed on the homepage...

By default, the homepage displays updated content within the last 7 days. This is Defined in MT parameter settings. We can set a parameter in MT's Index template to adjust the number of articles displayed on the Blog homepage. The specific method is as follows:

Find the scenario tag that controls the display of articles in the template, and add a lastn=" in this tag. X" parameter, "X" is the number of articles you want to define on the homepage, for example: , then your Blog homepage articles will always display the latest 8 updated articles, so that your Blog homepage articles will not be affected by the update frequency The reason is that it is stretched too long or too short.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508682.htmlTechArticleIn the MT Blog system, frequently updated Blog homepages often display many article entries, and the page will be very long. ; For a blog that is not updated frequently, when you occasionally update the blog, you will find that only one...
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