In AnQiCMS, let your important articles stand out on the website, such as setting them as the headline of the homepage, special recommendation, or slideshow display, which is a very practical content operation strategy.AnQiCMS provides intuitive functions to help you easily manage the recommended attributes of these articles and display them flexibly on the website front end.
Configure the recommended attributes of articles in the background
In the AnQiCMS admin panel, configuring article recommendation properties is a simple and direct process.When you enter the "Content Management" module, whether it is "Add Document" or "Edit Document", you will see an option called "Recommended Properties" in a prominent position on the document editing interface.
You can set multiple recommendation attributes for the same article based on actual operational needs.For example, an article can be both a 'headline' and a 'slide', which gives the content great flexibility, allowing you to better arrange and distribute the content.After completing the attribute selection, save your document, and these recommended attributes will be successfully attached to the article.
The front-end template call and display
After configuring the recommended attributes of the article, the next step is to display these articles with special tags on the front page of the website. AnQiCMS's powerful template tag system is especiallyarchiveListTags, are the core tools to achieve this goal.
archiveListTags allow you to filter the list of articles based on various conditions, including the recommendation attributes we have just set. By using inarchiveListthe tag withflagParameters, and specify the corresponding attribute letters, you can accurately call out articles with specific recommended attributes.
For example, if you want to display 5 of the latest articles marked as 'Headline' in a prominent position on the homepage, you can write the following code in the template file to retrieve the content:
{% archiveList articles with flag="h" limit="5" order="id desc" %}
{% for item in articles %}
<a href="{{ item.Link }}">{{ item.Title }}</a>
{% endfor %}
{% endarchiveList %}
This code will filter out all articles marked as "Top News[h]" and sort them in descending order by the latest published time, displaying the top 5. Similarly, if your website has a carousel area and you want to display articles marked as "Slideshow", you canflagthe parameter tof:
{% archiveList slides with flag="f" limit="3" %}
{% for item in slides %}
<img src="{{ item.Thumb }}" alt="{{ item.Title }}" />
<h3>{{ item.Title }}</h3>
{% endfor %}
{% endarchiveList %}
here,item.ThumbIt will retrieve the article thumbnail,item.Titlewhich is the article title, all of these can be used directly in the loop. It should be noted that in the samearchiveListtag call, only one can be specified at a timeflagFilter properties. If you need to display articles with different properties, you can use multiple templates separatelyarchiveListtags, each tag specifying differentflag.
exceptflagparameter,archiveListTags also supportexcludeFlagParameter, allowing you to exclude articles with specific recommended attributes; andshowFlag=trueYou can directly display the recommended attributes of the articles in the article list, which will be very useful in some scenarios where it is necessary to clearly identify the type of content.
By this flexible configuration and calling method, you can easily build content-rich, diverse layout website pages, so that important information gets the attention it deserves, thereby effectively improving user experience and content marketing effectiveness.
Frequently Asked Questions (FAQ)
Can an article have multiple recommended attributes set at the same time?Yes, AnQiCMS allows you to select multiple recommended attributes for the same article.For example, an article can be both a "headline" and a "slide", which means it can be displayed in the headline area of the homepage as well as in the carousel as a slide.
I have set recommended attributes, but the front page does not display them. Why is that?This is usually due to the configuration issue of the template tag call. Please check the template in your template.
archiveListlabel'sflagThe parameter should be consistent with the recommended attribute letter marks set in the article background. In addition, make sure that you have specifiedmoduleIdThe content model ID andcategoryIdThe category ID and other filtering conditions are correct, and the status of the article itself is published.Is it helpful to use the article recommendation attribute for the website's SEO?The recommended attributes are not direct SEO signals, but they can indirectly have a positive impact on SEO by optimizing user experience.For example, marking important content as 'headline' or 'recommended' and displaying it in a prominent position can increase the click-through rate and user stay time of these contents, sending a signal to search engines that the content is popular.In addition, a clear and突出内容布局 also helps search engines better understand the structure and content value of the website.