How to configure and display the recommended attributes of articles in AnQiCMS (such as头条, recommendation, slide)?

Calendar 👁️ 73

In AnQiCMS, let your important articles stand out on the website, such as setting them as the headline of the homepage, special recommendation, or slideshow display, which is a very practical content operation strategy.AnQiCMS provides intuitive functions to help you easily manage the recommended attributes of these articles and display them flexibly on the website front end.

Configure the recommended attributes of articles in the background

In the AnQiCMS admin panel, configuring article recommendation properties is a simple and direct process.When you enter the "Content Management" module, whether it is "Add Document" or "Edit Document", you will see an option called "Recommended Properties" in a prominent position on the document editing interface.

This area is designed with great care, it is presented in the form of a series of checkboxes, and you can assign one or more attributes to it based on the importance of the article and the display requirements.For example, if you want an article to be the 'headline' of the website, check the 'headline[h]' option;If you want to highlight it as 'Recommended' content in a certain area, check 'Recommended[c]';And if it is an article with strong visual impact, suitable for display in a carousel, then you can choose 'Slide[f]'.In addition to these, there are various attributes such as 'Special Recommendation[a]', 'Scrolling[s]', 'Bold[h]', 'Image[p]', and 'Jump[j]' to choose from, each with an easily memorable letter mark.

You can set multiple recommendation attributes for the same article based on actual operational needs.For example, an article can be both a 'headline' and a 'slide', which gives the content great flexibility, allowing you to better arrange and distribute the content.After completing the attribute selection, save your document, and these recommended attributes will be successfully attached to the article.

The front-end template call and display

After configuring the recommended attributes of the article, the next step is to display these articles with special tags on the front page of the website. AnQiCMS's powerful template tag system is especiallyarchiveListTags, are the core tools to achieve this goal.

archiveListTags allow you to filter the list of articles based on various conditions, including the recommendation attributes we have just set. By using inarchiveListthe tag withflagParameters, and specify the corresponding attribute letters, you can accurately call out articles with specific recommended attributes.

For example, if you want to display 5 of the latest articles marked as 'Headline' in a prominent position on the homepage, you can write the following code in the template file to retrieve the content:

{% archiveList articles with flag="h" limit="5" order="id desc" %} {% for item in articles %} <a href="{{ item.Link }}">{{ item.Title }}</a> {% endfor %} {% endarchiveList %}

This code will filter out all articles marked as "Top News[h]" and sort them in descending order by the latest published time, displaying the top 5. Similarly, if your website has a carousel area and you want to display articles marked as "Slideshow", you canflagthe parameter tof:

{% archiveList slides with flag="f" limit="3" %} {% for item in slides %} <img src="{{ item.Thumb }}" alt="{{ item.Title }}" /> <h3>{{ item.Title }}</h3> {% endfor %} {% endarchiveList %}

here,item.ThumbIt will retrieve the article thumbnail,item.Titlewhich is the article title, all of these can be used directly in the loop. It should be noted that in the samearchiveListtag call, only one can be specified at a timeflagFilter properties. If you need to display articles with different properties, you can use multiple templates separatelyarchiveListtags, each tag specifying differentflag.

exceptflagparameter,archiveListTags also supportexcludeFlagParameter, allowing you to exclude articles with specific recommended attributes; andshowFlag=trueYou can directly display the recommended attributes of the articles in the article list, which will be very useful in some scenarios where it is necessary to clearly identify the type of content.

By this flexible configuration and calling method, you can easily build content-rich, diverse layout website pages, so that important information gets the attention it deserves, thereby effectively improving user experience and content marketing effectiveness.

Frequently Asked Questions (FAQ)

  1. Can an article have multiple recommended attributes set at the same time?Yes, AnQiCMS allows you to select multiple recommended attributes for the same article.For example, an article can be both a "headline" and a "slide", which means it can be displayed in the headline area of the homepage as well as in the carousel as a slide.

  2. I have set recommended attributes, but the front page does not display them. Why is that?This is usually due to the configuration issue of the template tag call. Please check the template in your template.archiveListlabel'sflagThe parameter should be consistent with the recommended attribute letter marks set in the article background. In addition, make sure that you have specifiedmoduleIdThe content model ID andcategoryIdThe category ID and other filtering conditions are correct, and the status of the article itself is published.

  3. Is it helpful to use the article recommendation attribute for the website's SEO?The recommended attributes are not direct SEO signals, but they can indirectly have a positive impact on SEO by optimizing user experience.For example, marking important content as 'headline' or 'recommended' and displaying it in a prominent position can increase the click-through rate and user stay time of these contents, sending a signal to search engines that the content is popular.In addition, a clear and突出内容布局 also helps search engines better understand the structure and content value of the website.

Related articles

How to display the links and titles of the previous and next articles on the article detail page?

In AnQi CMS, adding navigation links for the previous and next articles on the article detail page is a key step to enhance the user reading experience and optimize the internal link structure of the website.This not only encourages visitors to browse more content, but also helps search engines better understand the structure of the website.AnQi CMS provides a very intuitive and easy-to-use template tag, allowing us to easily implement this feature.Understanding the "Previous" and "Next" navigation mechanism The template system of Anqi CMS is designed to be very flexible.

2025-11-07

How to call and display the website logo image in AnQiCMS template?

In website operation, the Logo is not only a visual symbol of the brand, but also an important part of the website's professionalism and user experience.AnQiCMS (AnQiCMS) provides an intuitive and simple way to manage and call the website logo, allowing you to easily display your brand image in all corners of the website.This article will introduce how to set your website logo in the Anqi CMS backend and guide you to accurately and flexibly call and display it in the front-end template, ensuring that your brand image is perfectly presented.### In Anqi CMS backend to set the website logo First

2025-11-07

How to customize the footer information of the AnQiCMS website, such as copyright statement and filing number?

## Custom AnQiCMS website footer information: Copyright statement and record number setting guide The website footer, although at the bottom of the page, is an indispensable area for conveying important information, establishing brand trust, and meeting legal requirements.A clear and complete footer can enhance the professionalism of the website and provide visitors with convenient legal information and contact details.This article will introduce in detail how to customize the copyright statement, filing number, and other information you want to display in the footer of the website in AnQiCMS.

2025-11-07

How to implement the display of multi-level navigation menus in AnQiCMS and support secondary dropdown menus?

A clear and intuitive navigation system is the key to the success of any website, it can guide visitors to quickly find the information they need and greatly enhance the user experience.AnQiCMS as an efficient content management system, provides flexible and powerful functions to build and manage the navigation menu of the website, including perfect support for multi-level structures and secondary dropdown menus. ### Define your navigation structure in AnQiCMS backend The first step in building a multi-level navigation menu in AnQiCMS is to configure it in the backend management interface.You can go to the **"Back-end Settings"** area

2025-11-07

How to display the subcategory list under a specified category in AnQiCMS template?

When using AnQiCMS to build a website, clearly organizing content and conveniently displaying it on the page is the key to improving user experience.Especially for content with multi-level classification structures, how to flexibly display the subcategory list under a specified category in the template is a need many users will encounter.A powerful template tag system of AnQiCMS, especially the `categoryList` tag, provides us with an elegant and efficient solution.### Understanding AnQiCMS Classification Structure Before delving into templates, it is important to understand how AnQiCMS manages classifications

2025-11-07

How does AnQiCMS handle and display image resources, including thumbnails and original images?

The charm of website content largely comes from images.They not only beautify the page, but also convey information directly, catching the reader's eye.Therefore, how a content management system (CMS) efficiently and intelligently handles and displays image resources is crucial for the overall performance of a website.AnQiCMS (AnQiCMS) provides a comprehensive and flexible solution in this regard, whether it is for the automatic generation of thumbnails or the optimization and presentation of the original images, it can help us easily manage the visual content of the website.

2025-11-07

How to automatically add the `rel="nofollow"` attribute to hyperlinks in the page to optimize SEO?

In website content operation, hyperlinks play a vital role, they are not only the bridge for users to browse and obtain information, but also the key for search engines to understand the structure of the website and pass on page authority (PageRank).However, not all links should pass weight, especially links to external websites.At this point, the `rel="nofollow"` attribute comes into play, which can tell the search engine "Do not follow this link, nor pass the weight of this page to the link target".Use `rel="nofollow"` appropriately

2025-11-07

How to format and display the article's publish timestamp in AnQiCMS templates?

In Anqi CMS, we all hope that visitors can clearly see the publication or update time of the articles.A clear and beautiful time format not only enhances the professionalism of the page but also optimizes the user experience.AnQi CMS with its flexible template engine makes it very simple to customize the display format of timestamps.Next, we will explore how to present the publishing time of articles accurately and elegantly in the AnQiCMS template.Understanding time data in AnQiCMS templates

2025-11-07