How to interpret the `flag` recommended attribute in the document details, for example, what do `h`, `c`, `f`, and others represent?

Calendar 👁️ 75

In AnQi CMS,flagThe recommended attribute is a very practical feature in content operation, which allows us to classify and tag document content, thereby realizing personalized display and filtering in different areas of the website.Understanding the meaning of these short letter codes can help us manage and present website content more efficiently.

FlagWhere can I find the attribute?

This is importantflagThe property appears in several key interfaces, it is both the characteristic of the document itself, and an important basis for querying and filtering documents.

First, in obtainingdocument details interface(archive/detailThe return parameter will showdataA field contains oneflagField. The value of this field represents which recommended attributes have been assigned to the current document. For example, if a document is a headline, it may have onehtag.

Second, in the process of obtainingDocument list interface(archive/list) in, flagThe attribute is not only one of the properties of each article in the return result, but can also be used as a request parameter. This means that you can not only find the properties of each article'sflagCan also be filtered according to specificflagThe value to filter and obtain the document list you want. For example, if you want to get all recommended articles, you can specify them in the requestflag="c".

Parsing variousFlagRecommended attribute

A Safe CMS has preset a series of single-characterflagmarks, each representing a different type of content recommendation or display. Next, let's go through these commonly used marks one by one:

  • h: Headline / Bold his a special mark, in the document it is defined as "Headline" and "Bold". Usually, when we mark a document ash(Headline) means that this content has the highest priority, is suitable for key recommendation display in the most prominent positions such as the homepage and top of category pages, to attract the attention of users.As for "bold", it is more of a hint for the front-end to bold the title during display to enhance the visual effect, but its core function is still as an important level marker for the content.

  • c: Recommendations cRepresent "recommendation". This is the most commonly used kind.flagThis indicates that this document is considered high-quality content worth recommending to users by the website operator.These contents usually appear in modules such as "Hot Recommendations", "Editor's Choice", etc., to guide users to discover more exciting content.

  • f: Slides fRepresent "slideshow". If your website's homepage or a specific page has a carousel, slideshow area, then it hasfThe marked document is prepared for these areas. This type of content usually requires high-quality images as covers to achieve good display effects in the carousel.

  • a: Special Recommendations aRepresents 'Special Recommendation'. The recommendation level of this attribute is usually higher than 'Recommendation'cIt can be understood as 'Special Recommendation' or 'Fine Selection'.Applicable to content that is very important, time-sensitive, or of extremely high value, which may be displayed in a dedicated 'featured' area of the website.

  • s: Scroll sRepresents 'Scrolling'. Items with thisflagThe document is commonly used in website modules such as 'scrolling news', 'announcement', or 'latest dynamic', which are usually presented in a scrolling or automatic scrolling manner to keep the information updated in real time.

  • p: Image pRepresents 'image'. This attribute indicates that the document is mainly composed of image content, or it is very suitable for presentation in the form of images.This is very useful in scenarios such as image channels, product displays, album sets, etc., and can contain withpMarked documents are aggregated to form a picture wall or picture list.

  • j: Jump jRepresents 'jump'.flagMarking the document as not a regular content page, but an entry point to other pages or external links.When the user clicks, it will not open the article detail page but will jump directly to the preset link address, which is very convenient for publishing friend links, promoting external cooperation, or creating special navigation entries.

FlagThe妙用 of properties: content operation strategy

Mastered theseflagThe meaning, we can flexibly apply them to the content operation of the website:

  1. Background editing and managementIn AnQi CMS backend, editors can check or fill in the corresponding information when publishing or editing documents according to the nature and display requirements of the content.flagProperties. This greatly simplifies the classification and promotion of content, and the display of content on the front-end can be adjusted without modifying the code.
  2. Front-end display and filtering: PassarchiveListinterface, we can according toflagProperties can be easily implemented to dynamically call content on the front-end page. For example, calling the 'Headline Area' on the homepageflag="h"of the article, in the 'Recommended Reading' sidebarflag="c"of the article. This way, even with a large content library, it can accurately present different types of content in the right place.
  3. application of multi-attribute combination: A document can have multiple attributes at the same time.flagProperty, for example, a 'recommended' 'headline' article, itsflagIt could behc. When wearchiveListrequestflag="h"at the time, the system will return all documents that containhproperties, regardless of whether they also havecProperties. This design provides great flexibility, allowing a piece of content to have multiple display purposes.

Summary

Of Security CMSflagThe recommended attribute is a powerful tool for content management and website operation. It helps us to refine and filter content in a concise and efficient manner, thereby realizing personalized and dynamic content display on the website front-end, greatly enhancing user experience and the discoverability of content.Reasonably utilize theseflagIt can make your website content more attractive and rich in layers.


Frequently Asked Questions (FAQ)

  1. Q: Can a document be set with multipleflagattributes? For example, both headline and recommendation?A: Yes, a document can be set with multiple attributes at the same timeflagProperty. In Anqi CMS, it is usually combined multipleflagcharacter combinations into a string, for examplehcwhich means this document is both a headline (h) and a recommendation (c) througharchiveListWhen querying an interface, if you requestflag="h"all documents containinghproperties will be returned, which gives the content great flexibility.

  2. Q: Mentioned in the document detailshWhat is the difference between being a "top story" and being "bold", both of which mean?A: In practical applications,hPrimarily used as the 'Headline' this higher-level recommendation attribute, indicating the importance of the content. 'Bold' is usually a frontend styling representation, possibly meaning it hashThe document title of the attribute will be bold by default when displayed. But in content filtering and logical judgment,hMore is reflected in the classification role of the "headline" content, rather than the mere text format.If fine-grained format control is needed, it is usually combined with CSS or an article content editor to achieve it.

  3. Q: How do I useflagProperties are displayed on the front-end page with different content modules?A: You can call the Anqi CMS providedarchiveListinterface and passflagParameter to implement. For example, in the "精品推荐" module on the homepage, you can requestarchive/list?flag=a&limit=5to get 5 recommended articles; in the "图片精选" module, you can requestarchive/list?flag=p&limit=8In this way, differentflagProperties can correspond to different content display areas, making the website layout more flexible and personalized.

Related articles

What do the `logo` and `thumb` fields represent in the document details, and what is the difference between them?

When managing content in Anqi CMS, we often encounter questions about image fields, especially the `logo` and `thumb` fields, which are both involved in image representation in the document detail interface (`archiveDetail`), but have subtle yet important differences in actual use and meaning.Understanding their differences can help us better optimize the visual presentation and loading performance of the website.### `logo` field: the "identity card" of the document When we talk about the `logo` field

2025-11-09

How is the `images` field (document group image) stored and parsed in the document details?

When using AnQiCMS to manage website content, images are undoubtedly an important element in enhancing the attractiveness of the content, especially when we want to add a series of related images to the document, the album feature becomes particularly crucial.So, how are these group images stored and parsed in the AnQiCMS document details?Understanding this will help us better utilize AnQiCMS for content creation and display.### The storage mechanism of document group charts First

2025-11-09

How to get the current view count (`views`) and comment count (`comment_count`) of the document?

When operating a website, understanding which content is more popular and which topics can spark discussion is crucial for optimizing content strategy.AnQiCMS (AnQiCMS) provides us with a convenient way to obtain this key data, such as the number of page views and comments on articles.Let's take a detailed look at how to obtain this information through the Anqi CMS API interface.

2025-11-09

What do the `module_id` and `category_id` fields represent in the document details, and can you further query model or category details through them?

## Unveiling the details of Anqi CMS document `module_id` and `category_id`: What do they mean?When using AnQi CMS for content management and website operation, we often obtain various data through API interfaces, among which the document detail interface (`/api/archive/detail`) is the key to obtaining the core information of a single article.In the returned data of this interface, you may notice the `module_id` and `category_id` fields.

2025-11-09

What is the role of `canonical_url` and `fixed_link` in document details for SEO and link management?

In website operation, the health status of links and the friendliness to search engines are the foundation for the success of the website.AnQi CMS provides us with two key fields: `canonical_url` and `fixed_link`, which play a crucial role in document details and help us optimize the search engine performance of the website and effectively manage links. ### canonical_url: Define the "main version" of the content Imagine that your website might have multiple URLs pointing to the same or highly similar content for various reasons.

2025-11-09

Is the `created_time` and `updated_time` field of the document in Unix timestamp, how to perform time format conversion?

In AnQiCMS (AnQiCMS), when you obtain various information such as documents, categories, attachments, and users through the API interface, you will find that fields like `created_time` (creation time) and `updated_time` (update time) are usually presented in integer form.This is indeed the Unix timestamp format commonly used by many systems, including AnQiCMS.### What is Unix timestamp? Unix timestamp, also known as POSIX time or Epoch time, is a way to represent time

2025-11-09

The value of the `status` field in the document details, for example 1, specifically indicates which display status the document has?

When using AnQi CMS to manage website content, you may encounter various technical parameters, one of which seems simple but is crucial is the `status` field in the document details.It acts like a 'switch' for the content, quietly controlling whether your article, product, or other information can be seen by visitors. Then, what does this `status` field specifically represent?In simple terms, it is an integer value used to mark the current display state of the document.

2025-11-09

If the document is a product type, how can you get its `price` (price) and `stock` (stock) information?

In Anqi CMS, if you are managing documents of product types and need to obtain specific price (`price`) and stock (`stock`) information for these products, it is actually very direct and convenient.The design of AnQi CMS considers such needs, making these key data as one of the core attributes of the document, you can easily obtain them through several core interfaces.### Get the price and stock information of a single product document When you need to view the price and stock of a specific product, AnQi CMS provides the `archiveDetail` interface

2025-11-09