In content operation, we often need to highlight specific content on the website, such as the latest updates, popular articles, or important product recommendations.Anqi CMS provides a very practical feature——“Document Recommendation Attributes”, which can help us easily achieve these diverse content display needs, making the website more attractive.

Flexible and diverse document recommendation properties

When we enter the AnQi CMS background to edit or publish documents, we will notice an option called "Recommended Attributes".This provides a variety of presets for identification, as if attaching different labels to content to indicate the 'special treatment' they should have on the website front-end.These properties include but are not limited to:头条[h]、幻灯[f]、推荐[c]、特荐[a]、滚动[s]、图片[p]和跳转[j]and so on.We can flexibly choose one or more attributes based on the specific value of each content and the desired display effect.For important announcements or significant news, you can select the 'Headline' attribute to give it a chance to occupy the most prominent position on the website; while for visual effects that stand out and are suitable for carousel display, you can choose the 'Slideshow' attribute.

It is worth noting that although the backend supports selecting multiple recommendation properties for a single document at the same time, when calling the front-end template, a specific content display area usually filters content based on one of the main properties.The purpose of doing so is to ensure that each display area can clearly present its preset theme content, avoiding confusion.

The recommended content will be displayed in a special showcase position

To make these documents with recommended attributes truly 'shine' on the website, we need to make use of the powerful template tags of the Aiqi CMSarchiveListThis tag is used to obtain the core tool of the document list, and the parameter is the key to connect the background recommended attributes and the front-end display position.flagThe parameter is the key to connect the background recommended attributes and the front-end display position.

For example, if there is a "Top News" section at the top of our website's homepage, we want it to display the latest and most important news. In the corresponding template file, we can write it like thisarchiveListTags:{% archiveList newsList with type="list" flag="h" limit="5" %}This line of code means: Get a list oftype="list"), which only contains documents marked as "Top News [h]"flag="h"), and display up to 5 itemslimit="5")。Thus, the website can automatically screen out the latest 5 headlines and display them in the specified area.

The same logic can be applied to the slide area of the website. If we mark a series of selected picture content as "slide[f]", then in the slide template,{% archiveList sliders with type="list" flag="f" limit="3" %}This code can easily capture these image contents and combine with the front-end JavaScript code to achieve dynamic slideshow display effects.

In addition, the Aqy CMS also providesexcludeFlagParameter, this is very useful for refined content layout.For example, a regular article list, we may not want it to repeat content that has already appeared in the "Headline Area" or "Slider Area".archiveListLabel it withexcludeFlag="h,f",The system will automatically exclude documents with "Top News" or "Slide" properties, avoiding repeated exposure of content, making the website content layout more reasonable and professional.

Recommended properties for multi-scenario applications

The application of recommended attributes is not limited to the headlines and sliders on the homepage. We can extend it to more scenarios based on the actual operational strategy of the website and the browsing habits of users.

  • The “Edit Selection” or “Hot Recommendation” on the sidebar: In the sidebar of the article list page,flag="c"orflag="a"you can filter out several “Editor’s Picks” or “Special Recommendations” articles to attract user clicks.
  • Product details page's 'Related Promotions'In the product list or detail page, use recommended attributes to identify products on promotion or with unique selling points, and place them in prominent positions to stimulate the desire to purchase.
  • News Center or Blog's 'Picture News': Throughflag="p"(Image), featuring articles with eye-catching thumbnails, providing a more user-friendly browsing experience for visually-oriented users.

By carefully planning and cleverly using these recommended attributes, the structure of the website will become more rich and three-dimensional, and the content presentation will be more layered.This not only effectively improves user experience and extends the time users spend on the website, but also accurately guides users to pay attention to the core content we want to promote, thereby bringing better operational results to the website.

Common Questions (FAQ)

  1. Q: Did I select both the '头条[h]' and '幻灯[f]' attributes for an article, will they both be displayed at the same time in the 'Headline News Area' and the 'Slide Show Area'?A: The 'Top News Area' template code of your website supports multiple recommended properties. If theflag="h"auto called, while the template code of the 'Slide area' is throughflag="f"This document, which has both 'Headline' and 'Slide' properties, will be displayed in these two different areas respectively.This allows the same important content to be highlighted in different forms at different locations on the website.

  2. Q: Both 'Headline[h]' and 'Bold[h]' are used in the recommended properties of the document[h]This may cause confusion when called?A: According to the design principles of the Anqi CMS, different semantic properties usually use unique identifiers. If both 'headline[h]' and 'bold[h]' appear in the document,[h]This may be an error in the document or a specific version of the design. In actual operation, the system may treat both as the same attribute, that is, callingflag="h"It will match the content marked as both "Top" and "Bold".To avoid potential confusion, it is recommended to prioritize the use of more representative property names (such as 'Headline') when publishing content, and to clearly agree on the specific use of each identifier within the team to ensure the unity of content management and the accuracy of the call effect.

  3. Q: Can a 'single-page' type on the website also be set with recommendation attributes and displayed prominently on the homepage?A: The 'Recommended Attributes' of AnQi CMS is mainly designed for the 'Document' type based on content models (such as articles, products, etc.), which is used for categorizing and displaying these documents that can be published and managed in batches.For 'Single Page' (such as 'About Us', 'Contact Us' etc.), the same 'Recommendation Properties' settings are usually not directly provided in the backend.pageListorpageDetailThe label combines the judgment of this custom field to realize filtering and display.