As an experienced website operation expert, I am well aware that a thorough understanding of the template tags in a high-efficiency content management system like AnQiCMS is the key to fine-grained operation and content display. Today, let's delve deeper into it.pageListLabel, this is an important tool for obtaining a single-page list, as well as the core fields and operational value of each single-page object (item) that contain what core fields and operational value.

Of Security CMSpageListTags, they are the instructions we commonly use when building independent pages such as 'About Us', 'Contact Information', and 'Service Introduction' that are relatively fixed and not frequently updated.It allows us to retrieve the data of these individual pages in bulk, thereby providing flexibility in navigation, sidebar, or specific content blocks.When we pass through{% pageList pages %}Loop throughpagesWhen collecting, each loop generates oneitemobject, thisitemwhich is the collection of specific information of the current single page.

UnderstandingitemThe core field of an object, like holding a universal key, can help us design page structures more accurately, optimize user experience, and even play an important role in SEO.

The unique identity and access path: Id, Title and Link

Firstly, each single-page object has its most basic and most important identifier and access method:

  • Id (Single Page ID)This is the unique identifier for each single page in the system, just like our ID number. When managing on the backend or performing more advanced template logic judgments,IdIt can ensure that we accurately locate and operate specific single pages. Although it is not often directly displayed in the frontend page, it is the cornerstone of backend logic and data association.
  • Title (Page Title)This is the most intuitive name on the single page, and it is the first information perceived by users on the website.A clear and attractive title not only enhances user experience but is also one of the core elements of search engine optimization (SEO).In the navigation menu, page title (<title>Tags) and other places that need an overview,Titleplay a crucial role.
  • Link (Page Link)This is the URL address for accessing the single page. Whether it is generating navigation links, article recommendations, or any jump, LinkFields provide direct paths to target pages. Properly planned link structures have a direct impact on the overall navigation logic of the website and the efficiency of search engine crawling.

These fields collectively constitute the basic "business card" information of a single page, ensuring the page's identifiability and accessibility.

Overview and detailed presentation: Description and Content

In addition to basic information,itemThe object also carries descriptive and integrity information about the page content:

  • Description (single page description)This field usually stores a brief summary or core content abstract of a single page. When displayed in a list,DescriptionProvide users with a quick preview to help them decide whether to click into the detail page.It is also an important source of SEO Meta Description tags, directly affecting the click-through rate of the page in search results.A concise and attractive description, which often improves the visibility and conversion rate of a page.
  • Content (single page content): This is the main content of the single page, which includes all the text, images, formatted information, etc. that we have carefully written for the page. Although inpageListof the loop to display the completeContentIt is not common, because it is usually very long, but under certain special layouts, such as when it is necessary to extract part of the content as a dynamic preview, or when embedded display is allowed in the content model, this field becomes indispensable. It ensuresitemThe object can carry all the core information of the page.

These two fields support the expression of content on a single page, from overview to details, layer by layer.

Visual Attractiveness: Logo, Thumb and Images

In this 'face-value' era, the visual presentation of the page is also important.itemThe object also provides rich image information:

  • Logo (full-page thumbnail image)This field usually points to the main image on the page or a larger representative image.It may be used for the page header banner, prominent display of content modules, or as a preview image when shared on social media.The positioning of the 'large image' makes it more suitable for scenes with ample space and a strong visual impact.
  • Thumb (full-page thumbnail):ThumbIsLogoThe "mini version", pointing to the thumbnail of the page. It is more suitable for use in compact lists, card layouts, recommendation spots, or small preview images to save page loading resources and maintain a neat layout.When building a list, it is usually preferable to useThumbfield.
  • Images (full-page slide set)If a single page needs to display a photo gallery, product views from multiple angles, or a series of carousels, thenImagesThe field provides such capabilities. It is usually an array or collection of image URLs, making it convenient for us to loop through them in templates and provide users with a richer visual experience.

These image-related fields make the display of a single page not limited to text, allowing it to quickly attract users' attention through visual elements, enhancing the beauty and interactivity of the page.

MasteredpageListthe tags returned byitemThe meaning and usage of these core fields in the object allow us to be more proficient in website content layout, creating an aesthetically pleasing and practical Anqi CMS site. In practice, it only takes a loop traversal in the template.pagesA collection, allowing access to eachitemsuch as these properties,{{item.Title}}/{{item.Link}}etc., thus dynamically presenting these data in various corners of the website.


Frequently Asked Questions (FAQ)

  1. pageListthe single-page object returneditemAre we including fields that we have customized?Generally speaking,pageListreturneditemThe object will contain the core fields set by default in the background of the single page. If your single page has expanded additional information through custom fields, these custom fields are inpageDetailtags, you can directly pass throughname="您的自定义字段名"Access in the manner. InpageListreturneditemObject, these custom fields are usually included as well. You can access them through{{item.您的自定义字段名}}Attempt to access in this way. If you encounter a situation where you cannot access directly, it is recommended to consult the latest template development document of AnQiCMS or seek support in the community to determine whether it ispageListThe specific way to access in the loop.

  2. item.Logoanditem.ThumbWhat is the difference between these fields, and how should we choose to use them?Literally speaking,Logo(Thumbnail full-size image) usually refers to the main visual image or a larger size representative image of the page, suitable for display in key positions on the page, such as the top or large-size cards, to provide a clear visual effect. AndThumb(Thumbnail) tends to prefer smaller, more compact image versions, suitable for lists, sidebar recommendations, or any scenario that requires saving space and quick loading. When choosing, you can decide based on the size of the page area and the clarity requirements of the image, usually prioritizing in list displays.ThumbUse it in detail or large image displayLogo.

  3. If I only want to display it in the listitem.ContentHow should I operate to display only a part of the content instead of all?Whenitem.ContentWhen the field content is too long, it will directly affect the layout and user experience of the list. The Anqi CMS template engine provides a filter to handle this situation. You can usetruncatecharsortruncatewordsA filter to truncate content and add an ellipsis. For example,{{ item.Content|truncatechars:100 }}truncates the first 100 characters of the content (including the ellipsis), and{{ item.Content|truncatewords:20 }}It will truncate the first 20 words. Both of these filters can help you display content summaries elegantly while maintaining the integrity of the content.