How are the "recommended properties" (such as headlines, slides) used to control the special display positions on the homepage or list?

Calendar 👁️ 66

In content operations, we often need to highlight specific content on the website, such as the latest news, popular articles, or important product recommendations.AnQi CMS provides a very practical feature - "Document Recommendation Attribute", which can help us easily achieve these diverse content display needs, making the website more attractive.

Flexible and diverse document recommendation attributes

When we enter the Anqi CMS backend to edit or publish documents, we will notice an option called "recommended attribute".Here are various predefined identifiers, like tags attached to content to indicate the 'special treatment' they should have on the website front-end.These properties include but are not limited to: Headline [h], Slide [f], Recommendation [c], Special Recommendation [a], Scroll [s], Image [p], and Jump [j] and so on.We can flexibly choose one or more properties based on the specific value of each content and the desired display effect.For example, an important announcement or a major news can be checked as 'Headline' attribute, giving it a chance to occupy the most prominent position on the website;And some visual effects stand out, suitable for carousel display, you can choose the 'slide' attribute.

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

Display recommended content in a special display position

To make these documents with recommended attributes truly shine on the website, we need to make use of the powerful template tags of Anqi CMSarchiveList. This tag is used to obtain the core tool for the document list, and the parameter, is the key to connect the back-end recommended attributes with the front-end display position.flag参数,就是连接后台推荐属性和前端展示位的关键。

For example, if our website homepage has a "Top News" section at the top, 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 of (type="list") that includes only documents marked as 'headline[h]' (flag="h") and displays a maximum of 5 items (limit="5"). So, the website can automatically filter 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 image content as "slide[f]", then in the slide template, through{% archiveList sliders with type="list" flag="f" limit="3" %}This code can easily capture these image contents and combine it with front-end JavaScript code to achieve dynamic carousel display effects.

Moreover, Anqi CMS also providesexcludeFlagParameters, this is very useful for fine-grained content layout. For example, a regular article list, we may not want to repeat the content that has already appeared in the "Headline Area" or "Slideshow Area".At this point, we can use the regular list ofarchiveListAdd in the labelexcludeFlag="h,f"The system will automatically exclude documents with 'Top News' or 'Slideshow' properties, avoiding duplicate content exposure, making the website's content layout more reasonable and professional.

The multi-functional application scenarios of the recommended attribute

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

  • The "Editor's Picks" or "Hot Recommendations" on the sidebar: In the sidebar of the article list page, throughflag="c"orflag="a", you can filter out several "Editor's Recommendations" or "Special Recommendations" articles to attract user clicks.
  • Product details page 'related promotions'In the product list or detail page, use recommended attributes to identify products on promotion or with unique selling points, place them in a prominent position to stimulate purchase desire.
  • News center or blog's 'Photo News': Passflag="p"(Photos), showcasing articles with eye-catching thumbnails, providing a more user-friendly browsing experience for visually-oriented users.

By carefully planning and skillfully using these recommended attributes, the structure of the website will become richer and more three-dimensional, and the presentation of content will also 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 effects to the website.

Frequently Asked Questions (FAQ)

  1. Q: Did I select the 'Headline[h]' and 'Slide[f]' properties for an article at the same time, will they both be displayed in the 'Headline News Area' and the 'Slide Area' on the front page?A: The Anqi CMS backend supports documents having multiple recommended attributes. If the template code for your website's "Top News Area" is throughflag="h"It is called, while the template code of the “Slide Area” is throughflag="f"This document, which has both "Headline" and "Slideshow" attributes, will be displayed in 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 the “Headline[h]” and “Bold[h]” properties are used in the recommended document properties[h]Identify, will this cause confusion when called?A: According to the design principles of Anqi CMS, different semantic properties usually use unique identifiers. If the document appears with both "top news[h]" and "bold[h]", both should be used[h]The situation is identified, which may be a typo in the document or a design of a specific version. In practice, the system may treat both as the same attribute, i.e., callingflag="h"Will match the content marked as "Top News" and "Bold".}To avoid potential confusion, it is recommended to use more representative property names (such as "headline") when publishing content, and to clearly agree on the specific usage of each identifier within the team to ensure the uniformity of content management and the accuracy of the call effect.

  3. Q: Can the 'single-page' type on the website also set recommendation attributes and be displayed specially on the homepage?A: The "recommended attributes" of AnQi CMS are mainly designed for the "document" type based on the content model (such as articles, products, etc.), which is used to classify and display these documents that can be published and managed in batches.For "single page" (such as "About Us", "Contact Us" etc.), it is usually not directly provided with the same "recommended properties" settings in the background.If you need to give a special recommendation display to a single page, you can consider adding a custom field to mark its importance through the "custom field" feature of the single page, and then through the template in the homepage or other display areas, bypageListorpageDetailTag combined with the judgment of this custom field to implement filtering and display.

Related articles

How to introduce third-party JavaScript libraries (such as Markdown, mathematical formulas, flowcharts) in templates to enhance content display?

In AnQiCMS, introducing third-party JavaScript libraries is a very effective means to make your content display more expressive and professional.For example, writing clear text with Markdown, displaying complex mathematical formulas with MathJax, or using Mermaid to draw intuitive flowcharts can greatly enrich the user's reading experience.The powerful template system of AnQiCMS provides us with a flexible integration method.## AnQiCMS template system overview First

2025-11-09

Does AnQiCMS support displaying the document list under a specific Tag on the front end?

In AnQi CMS, you can of course easily display the document list under a specific Tag (label) on the frontend.This is not only a basic function of a content management system, but AnQi CMS also enables you to achieve this in a very fine and user-friendly manner through its flexible template tag system, thus better organizing content and improving the user experience and SEO performance of the website.Starting from version 2.1.0 of AnQi CMS, the system introduced powerful article and product Tag label features, which means you can now add one or more tags to your content (whether articles or products)

2025-11-09

How to correctly display the current page path information in the breadcrumb navigation of a website?

The website is operational, a clear navigation path is crucial for user experience and search engine optimization (SEO).When a visitor enters a deep page of the website, the breadcrumb navigation (Breadcrumb Navigation) is like a trail of breadcrumbs that guides them back, helping them understand their position in the website structure and making it convenient to return to the upper-level page.In AnQiCMS (AnQiCMS), implementing an efficient and practical breadcrumb navigation to correctly display the path information of the current page is simpler than you imagine.

2025-11-09

How do related document tags intelligently display content similar to the current article topic?

How to guide visitors to more related content naturally after they finish reading an article in content operation, which can not only significantly improve user experience, but also effectively extend the visitors' stay on the website, reduce the bounce rate, and thus have a positive impact on search engine optimization (SEO).AnQi CMS is well-versed in this, providing intelligent and flexible mechanisms that allow us to easily implement this "You might also like" content recommendation.### Content Tag: The First Step of Building Associations AnQi CMS realizes smart content association through its powerful "tag" feature

2025-11-09

How to view the content that has been crawled and accessed in the website traffic statistics and crawler monitoring data?

Manage a website, what we care most about is whether our content is seen by users and whether it is indexed by search engines.This data is like the pulse of the website, directly reflecting the health of content operation and the activity of the website on the Internet.AnQi CMS knows these core needs and has built practical traffic statistics and spider monitoring functions, allowing us to easily master the key performance indicators of the website.Why are we so concerned about traffic and crawler data?In short, paying attention to these data is to better understand and optimize our website. First

2025-11-09

How to optimize the display format of text and numbers using AnQiCMS filters (such as truncatechars, floatformat)?

How to make information concise, clear, and professional in website content operation?This is often a challenge faced by many operators. Whether it is a news summary, product description, or price data, statistics, if displayed in a disorganized manner, it not only affects user experience but may also lead to deviations in information transmission.AnQiCMS (AnQiCMS) fully understands this pain point, its powerful template engine built-in a series of practical filters, which can help us easily optimize the display format of text and numbers, making your website content look brand new.Refined text

2025-11-09

How to correctly render Markdown document content as HTML in a template?

Content creators often choose Markdown as their preferred tool because it can organize content in a concise and clear manner, while also easily achieving formatting effects.However, simply inputting content in Markdown format in the background is not enough to allow the website front end to display it correctly. We need some additional steps to ensure that the content is rendered correctly as HTML.This article will introduce in detail how to make Markdown content turn beautiful in AnQiCMS templates, presenting it to users in the form of HTML.### One

2025-11-09

How to dynamically display copyright information and the current year at the bottom of a website or other areas?

In website operations, keeping information up to date is an important part of maintaining a professional image, and the copyright year at the bottom of the website is often overlooked. Manually modifying it every year is not only cumbersome but also prone to omission.Luckyly, using Anqi CMS, we can easily implement the dynamic display of copyright information, so that the information at the bottom of the website is always up-to-date.Why is dynamic copyright information so important?Imagine a user visiting a website and seeing the copyright year prominently displayed at the bottom.This could make the website look outdated and may give people an impression of unprofessionalism.For content operators

2025-11-09