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 / Boldhis 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: RecommendationscRepresent "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: SlidesfRepresent "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 RecommendationsaRepresents '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: ScrollsRepresents '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: ImagepRepresents '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: JumpjRepresents '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:
- 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. - Front-end display and filtering: Pass
archiveListinterface, 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. - 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)
Q: Can a document be set with multiple
flagattributes? 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.Q: Mentioned in the document details
hWhat 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.Q: How do I use
flagProperties 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.