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, through
flag="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': Pass
flag="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)
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 through
flag="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.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.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, by
pageListorpageDetailTag combined with the judgment of this custom field to implement filtering and display.