When using Anq CMS to manage website content, we often need to highlight certain important articles or products to make them easier for visitors to find.This is when the "recommended attribute" of content publishing comes into play.It is not a complex background setting, but a very intuitive option that we can see on the 'Add Document' interface every time we publish or edit documents, and it is an important tool for us to effectively manage the display and priority of content.
Understanding "recommended attributes": the幕后pusher of content publication
When we have finished writing a piece of content and are ready to publish, on the 'Add Document' or 'Edit Document' page of Anqi CMS, we will see an option called 'Recommended Properties'. Here are eight different properties to choose from, namely:
- Headline [h]: Typically used in the most important and prominent position on a website, like the front page headline of a newspaper.
- Recommend [c]: Widely used in various recommendation areas, indicating that the content is worth general recommendation.
- Slide [f]This is commonly used for carousel or slide show content.
- Special recommendation [a]It goes beyond 'recommended', indicating specially recommended content.
- Scroll [s]It is suitable for news scrollbars or areas with the latest updates.
- Bold [h]This
hIshotThe meaning, mainly used to bold the title visually in a list, to attract users' attention. - Image [p]: Indicates that the content is suitable for display in a list in the form of images, such as a list with text and images mixed.
- Jump [j]If this content needs to jump to an external link or another specified page within the site after clicking, check this option.
We can select one or more recommended properties for the same document based on its nature and needs.For example, a very important news item may be both a 'top story' and a 'recommendation', and it includes an eye-catching 'picture'.
How does the 'recommended attribute' affect the call and display priority of front-end content?
Understanding how the 'recommended attribute' affects the front-end, the key point is that it is not a magic button that automatically pushes content to a certain location.On the contrary, it is more like a powerful 'filter', which, combined with template tags, allows us to flexibly 'summon' content with specific attributes in different areas of the website.
In the construction of front-end templates, Anqi CMS providesarchiveListThis tag is used to call the document list. When we need to display content with a certain recommendation attribute in a specific content block, we can add this tag.flagParameter.
For example, if your website homepage has a special 'Top News' area, you can call it like this in the corresponding template code:
{% archiveList archives with flag="h" limit="5" %}
{# 这里是展示头条新闻的HTML结构 #}
{% for item in archives %}
<a href="{{item.Link}}">{{item.Title}}</a>
{% endfor %}
{% endarchiveList %}
This code means: Filter out the latest 5 articles with the attribute 'Headline[h]' from all documents and display them in the style defined by the template.
The priority of display is not determined by the attribute itself, but by the design and layout in the template you use.For example, you have called in the slide area at the top of the website.flag="f"The content, then these slide content naturally gets the highest display priority. And in a "Latest Recommendation" module in the sidebar, you may have calledflag="c"The content, the priority of which is relatively lower.
Furthermore,archiveListTags also supportexcludeFlagParameters can exclude content with specific attributes. For example, you may want to exclude content that has been set as "headline[h]" and "slider[f]" in a normal article list area to avoid duplication.
{% archiveList archives with excludeFlag="h,f" limit="10" %}
{# 展示不含头条和幻灯属性的普通文章列表 #}
{% for item in archives %}
<a href="{{item.Link}}">{{item.Title}}</a>
{% endfor %}
{% endarchiveList %}
This flexible calling method allows website operators to accurately control the display of each piece of content according to actual operational strategies and page layouts. For example:
- Home focus image:Invoke
flag="f"The content, usually only displaying a few large images, gets the highest exposure. - The recommended position on the article list page:Invoke
flag="a"orflag="c"The content, usually appearing in the form of small images with titles, enhances the click-through rate of related content. - The sidebar's "Hot Articles":In addition to sorting by views, you can also combine
flag="s"(scroll) to display.
By reasonably planning the 'recommended attributes' of content and the call logic in the template, we can make the website content more intelligent and hierarchical. Not only does it optimize the user's browsing experience, but it also better guides search engines to crawl important content.This makes AnQi CMS not only a content publishing system, but also a powerful tool for refined content operation.
Frequently Asked Questions (FAQ)
Can I set multiple recommendation attributes for a document at the same time? Will they conflict?Yes, you can set multiple recommendation attributes for a document at the same time, for example, a document can be both "Headline[h]" and "Slide[f]".These properties do not conflict with each other, they are independent tags.flagJust do it.
Will the content automatically display in a specific area of the website after I set the recommendation attributes?It will not display automatically. The recommended attribute itself is just a "label" for the content, which needs to match the specific "call rules" in the front-end template (such asarchiveListin the labelflagParameters combined, can be filtered and displayed. Website administrators or front-end developers need to configure these call logic according to website design and operation requirements.
Does the 'Recommended Attribute' have a direct impact on the website's SEO?“Recommended attribute” is not a direct SEO factor, it does not directly tell search engines “This content is important”.But it indirectly has a positive impact on SEO by optimizing user experience (UX) and content structure.For example, highlighting important content can increase click-through rate, reduce bounce rate, and extend the time users spend on the website, all of which are important indicators for search engines to evaluate the quality of a website.At the same time, displaying keyword-related content in a prominent position through 'recommended attributes' can also better guide search engine spiders to discover important information on the website.