When building and maintaining a website, the homepage is undoubtedly the first stop for users to visit. The way its content is presented directly affects user experience and the efficiency of information delivery.A meticulously planned and flexible homepage layout that effectively attracts visitors, guides traffic, and highlights the core value of the website.AnQiCMS provides a series of powerful content recommendation features, allowing you to easily manage the dynamic display of homepage content and meet various operational needs.
Flexible use of the recommendation attributes of Anqi CMS
The Anqi CMS provides rich recommendation attributes for each document (whether an article or a product), in terms of content management.These attributes, such as 'Top Story' and 'Slideshow', are like individual content tags. You can label them differently based on the characteristics of the content and the layout requirements of the homepage.This means that you can call and display specific content in different areas of the homepage according to these tags, achieving refined operation of the homepage.
When you add or edit documents in the background, you will see multiple options in the 'Recommended Attributes' area, which are usually identified by letters, such as:
- Headline [h]:Commonly used for the most core and important news or articles on a website.
- Recommend [c]:Widely used in various recommendation positions, such as sidebar recommendations and selected articles in article lists.
- Slide [f]:The ideal carousel content source, usually displayed in a large-sized area at the top of the website.
- Special recommendation [a]:Content for special recommendation, priority may be between headlines and regular recommendations.
- Scroll [s]:Suitable for news scrollbars or bulletin boards and other areas that require continuous updating and display.
- Image [p]:Content with high-quality images is emphasized, commonly used in recommended modules with mixed text and images.
- Jump [j]:If the content needs to jump directly to an external link instead of the detail page, you can use this attribute.
The strength of these properties lies in the fact that they are not mutually exclusive.A document can have both 'Headline' and 'Slide' properties, which provides great flexibility for content reuse on the homepage and multi-dimensional display.
How to control the display of homepage content through recommendation attributes?
Implement dynamic control of the home page content, mainly through the template tags of AnQi CMSarchiveListTo complete. This tag allows you to filter and retrieve documents based on different parameters, whereflagThe parameter is the key.
For example, if you want to display the latest "头条" news at the top of the homepage:
{# 假设这是首页的某个区域,用于展示头条新闻 #}
<div class="headline-news">
<h2>今日头条</h2>
{% archiveList headlines with type="list" flag="h" limit="1" order="id desc" %}
{% for item in headlines %}
<a href="{{item.Link}}">
<img src="{{item.Logo}}" alt="{{item.Title}}">
<h3>{{item.Title}}</h3>
<p>{{item.Description}}</p>
</a>
{% endfor %}
{% endarchiveList %}
</div>
In this code,flag="h"It precisely filters out the content marked as "头条".limit="1"Then only the latest one is displayed.
For example, you may want to have a large-sized image carousel (slideshow) on the homepage to attract users' attention:
{# 首页轮播图区域 #}
<div class="slideshow-banner">
{% archiveList slides with type="list" flag="f" limit="5" order="id desc" %}
{% for item in slides %}
<a href="{{item.Link}}">
<img src="{{item.Images[0] or item.Logo}}" alt="{{item.Title}}"> {# 优先使用组图第一张,否则使用Logo #}
<div class="caption">
<h3>{{item.Title}}</h3>
<p>{{item.Description}}</p>
</div>
</a>
{% endfor %}
{% endarchiveList %}
</div>
Here, we useflag="f"To retrieve the 'slide' content and play through.limit="5"To limit the number of carousel slides.ImagesThe field is usually used for multi-image uploads, and here it cleverly retrieves the first image.
If your website sidebar needs a 'Recommended Reading' list, or a special theme page requires 'Featured Articles', the operational logic is similar:
{# 侧边栏推荐阅读 #}
<div class="sidebar-recommend">
<h4>推荐阅读</h4>
<ul>
{% archiveList recommends with type="list" flag="c" limit="10" order="views desc" %}
{% for item in recommends %}
<li><a href="{{item.Link}}">{{item.Title}}</a></li>
{% endfor %}
{% endarchiveList %}
</ul>
</div>
{# 某个专题页面的特荐文章 #}
<div class="featured-articles">
<h3>本周特荐</h3>
{% archiveList specialFeatures with type="list" flag="a" limit="3" order="id desc" %}
{% for item in specialFeatures %}
<div class="article-card">
<a href="{{item.Link}}">{{item.Title}}</a>
<span>发布日期:{{stampToDate(item.CreatedTime, "2006-01-02")}}</span>
</div>
{% endfor %}
{% endarchiveList %}
</div>
Through these flexibleflagProperties, you can set corresponding recommendation properties for different content according to the design requirements of the website, and then use them in the front-end template.archiveListLabels accurately call them, thus achieving personalized and dynamic display of content on the homepage and other key pages.
Content operation strategy and practice suggestions
Mastering the technical implementation is important, but even more crucial is how to integrate these features into actual content operation strategies:
- Regular updates and maintenance:The timeliness of the recommended content on the homepage is crucial.Suggest checking and updating content with high-priority attributes such as 'Headline', 'Slideshow', etc., to ensure that visitors see fresh and relevant information every time they visit.
- Distinguish content priorities:Different recommendation attributes represent different levels of importance or display formats.For example, set the most important event as 'Headline', the latest product release as 'Slideshow', and evergreen content as 'Recommendation' for long-term display in the sidebar.
- Combine with data analysis:Using the built-in traffic statistics function of AnQi CMS, analyze which recommended content is most popular and which content has a high click-through rate.According to data feedback, adjust recommendation strategies, optimize content selection and layout.
- Guide user path:Recommended content planning can guide users to delve deeper into the website.For example, link the 'Headlines' on the homepage to the special page, and then link to the specific product or article details through the 'Recommended' link on the special page, forming a clear user conversion path.
- A/B Testing:Under conditions permitted, it is possible to try A/B testing on the content combinations or layouts of different recommended attributes to find the best scheme that attracts users and improves conversion effectiveness.
The recommended attributes of AnQi CMS provide powerful tools for website operations, making the display of home page content no longer static and unchangeable, but a dynamic canvas that can be flexibly adjusted according to operational goals and user feedback.Reasonably utilize these properties to effectively enhance the website's attractiveness, user activity, and overall operational effectiveness.
Common Questions (FAQ)
How should I set it up if I want to display both headline and recommended content in the same area?
You can inarchiveListTagsflagIn the parameters, multiple recommended attributes are called simultaneously by separating them with commas. For example,flag="h,c"The system will retrieve documents that have either the 'Headline' or 'Recommendation' attributes. The documents will be displayed in reverse order of document ID or other specified sorting methods, and you can also sort by multiple criteria.archiveListLabels are retrieved and merged for display.
2. Will the recommended attributes affect the SEO weight of the content?
The recommended attribute is an internal display control mechanism of AnQi CMS and does not directly affect the SEO weight of the content.SEO ranking is mainly affected by factors such as content quality, keyword matching, external links, internal link structure, and page loading speed.However, optimizing the home page content display through recommended properties can enhance user experience, increase the time users spend on the website, and the number of clicks. These positive user behavior signals will indirectly have a positive impact on SEO.
3. Can single-page content also set recommended attributes, in addition to articles and products?
According to the document description of AnQi CMS, recommended properties are usually for 'documents', which includes articles and product content models under the documents.Single-page sections (such as 'About Us', 'Contact Us', etc.) usually have their own independent management methods, and their content is often fixed and independent, not suitable for dynamic display through recommendation properties.pageListLabels are combined with other filtering logic to achieve this.