The flexibility of AnQi CMS lies in its close integration of the display logic of list content with template design.Not like some CMS might provide a global backend setting, AnQi CMS tends to allow you to decide the specific behavior of each list when designing the template.The benefit of this design is that you can set a small amount of content for the hot recommendation area on the homepage, more content for the special topic list page, and also provide pagination functionality for the related product list, truly realizing a personalized display of 'thousand stations, thousand faces'.

The core implementation primarily revolves around several key template tags, the most commonly used beingarchiveListTags, it is responsible for calling the list of content types such as articles or products, etc. When you need to control the number of items displayed per page,archiveListTagslimitProperties become particularly important. For example, if you want to display 10 articles or products per page, just set it in the template.archiveListLabel addlimit="10"property.

Just setlimitProperties, usually only display a fixed amount of content. If you not only want to limit the number of items displayed per page, but also need to generate 'Previous page', 'Next page', and specific page number navigation at the bottom of the page, then you need to cooperate witharchiveListThe other attribute of the tagtype="page"). Whentypeis set to"page"whenarchiveListIt not only loads the content of the current page according tolimitbut also passes the total number of pages, current page number, and other pagination information to the system.

Later, you can usepaginationtags to receive these pagination data, and render the complete page number navigation on the page. ThroughpaginationTags, you can easily implement things like displaying how many adjacent page numbers (show="5"), as well as "Home Page

ExceptarchiveListLabel, similar content list labels in AnQi CMS, such astagDataList(Used to display a list of articles or products associated with a label) andcommentList(Used to display the comment list), and all follow the samelimitandtype="page"property rules to control the number of items displayed per page and pagination logic.

This template tag-based setting method gives the website design and operation a high degree of freedom. For example, you may want to display the latest 5 articles in the article recommendation module on the home page of the website without pagination, in which case you just need to use{% archiveList archives with limit="5" %}In a special article category page, you may need to display 15 articles per page and provide complete pagination navigation.{% archiveList archives with type="page" limit="15" %}Complemented with{% pagination pages %}Label.

In addition,limitThe property also supports a more advanced usage, that is, throughlimit="offset,count"in the form of, for examplelimit="2,10".This means the system will skip the first 2 items in the list and then start displaying the next 10 items from the 3rd item.This is very useful for the scenario of displaying several special recommended items at the top of the page, and then displaying the rest of the content in a paginated form, making the layout of the content more flexible and varied.

In summary, Anqi CMS, through its powerful template tag system, delegates the control of displaying the number of articles or products on each page to the template designer. Whether it's a simple content quantity limit or a complex content list with pagination features, it can be achieved through flexible application.limit/type="page"andpaginationLabels can be easily implemented, thereby providing users with a better browsing experience and helping website operators to better plan content display strategies.


Common Questions and Answers (FAQ)

Q1: Does the Anqi CMS have a global setting that can modify the number of items displayed per page for all lists at once?A1: The design philosophy of Anqi CMS is to provide high flexibility.Therefore, it does not have a unified global setting to control the number of items displayed per page for all content lists.limitThis method needs some template editing operations, but it ensures that each list can be optimized according to its specific needs.

Q2: If I only want to display the latest/hottest articles or products in a certain module without pagination, how should I set it up?A2: In this case, you just need to usearchiveList(or other content list tags, such astagDataList) oflimitProperty, and specify the number you want to display, no need to add.type="page"Property. For example,{% archiveList archives with limit="5" order="views desc" %}It will display the top 5 articles or products with the highest views without generating any pagination navigation.

Q3:categoryListandpageListDo tags also support pagination for displaying content?A3:categoryList(Category List) andpageList(Single Page List) tagslimitThe property is mainly used to control the display quantity of themselves (i.e., categories or single pages), such as how many top-level categories to display.They do not directly provide in-page pagination functionality for articles or single-page content under the category.archiveListtags, and set them up fortype="page"andlimitproperties.