How to use the `type` parameter to call the homepage Banner under a specific group in the Anqi CMS backend?

Calendar 👁️ 66

As an expert deeply familiar with website operation, I know the importance of the home page banner for the image and marketing promotion of the website.It is not only the visual focus, but also the key area for conveying core information and guiding user behavior.AnQiCMS provides high flexibility in Banner management, especially through itsbannerListLabel collaborationtypeParameter, let us accurately call the home page Banner under specific groups according to different operational needs. Today, let's delve into this practical feature.

Use cleverlytypeParameter: Unlock the mystery of the Banner group call on the Anqi CMS homepage

In today's fiercely competitive online environment, the website's homepage banner is like a showcase, the first line of attack to attract visitors' attention and convey core information.A well-designed, accurate Banner that can effectively improve user experience and promote conversion.AnQi CMS, as an efficient content management system, fully understands the importance of this need, and has therefore designed the Banner management function in detail.But how can we flexibly display specific groups of banners on the homepage accurately according to different scenarios, such as marketing activities, seasonal themes, etc.? This isbannerListwith the tag andtypeparameters are where they really shine.

Understand the Banner management mechanism of Anqi CMS

The AnQi CMS was designed with the diversity of website content and operational flexibility in mind.It allows you to create and manage multiple Banner groups in the background.This means you can prepare exclusive Banner sets for different marketing activities, product series, or page areas (such as the homepage slideshow, sidebar mini Banner, a specific festival promotion Banner, etc.).This grouping ability aims to help operators achieve more refined content placement, avoiding all banners mixed together and difficult to manage and schedule.

Core tool:bannerListwith the tag andtypeParameter

bannerListIs an Anqi CMS provided powerful template tag, specially used for calling the background configuration of the Banner image list on the front-end page. Its core lies in a namedtypeThe parameter. This parameter is the group name you set for Banner in the background, when you specify it in the templatetype="您的分组名"then,bannerListThe label will intelligently filter and only return all Banner image data under that group.

For example, if you create a banner group named "Home Large Image" in the background and upload some exquisite pictures, then when calling it in the template, you can write it like this:

{% bannerList banners with type="首页大图" %}
    {% for item in banners %}
    <a href="{{item.Link}}" target="_blank">
        <img src="{{item.Logo}}" alt="{{item.Alt}}" />
        <h5>{{item.Title}}</h5>
    </a>
    {% endfor %}
{% endbannerList %}

If omittedtypeParameter, the system will default to calling the nameddefaultBanner under the group. This makes the call to Banner both highly customizable and maintain a certain default nature, very flexible.

In the above code,bannersIt is a variable name we define, used to store the banner list data obtained from the background. Throughforloop, we can iterate over each one in the list.item(i.e., each Banner object). Eachitemcontains a series of available fields, such as:

  • item.Id: The unique identifier ID of the Banner.
  • item.Logo: The address of the Banner image, which is the most commonly used field.
  • item.Link: Banner click after jump link address.
  • item.Alt: Alternative text for Banner image, very important for SEO and accessibility.
  • item.Title: Banner title, usually used for combination of images and text display or SEO assistance.
  • item.Description: Description of the banner, which can be used for more detailed information display.

Practice step by step: How to call a specific group Banner in the template

Understood the principle, let's see the specific operation steps next:

Step 1: Set up Banner group in Anqi CMS backend

First, you need to go to the Banner management area in the Anqi CMS admin interface.Here, you can create or edit a Banner and specify a "group name".This group name is plain text, you can name it according to your actual needs, such as 'Home Carousel', 'Promotional Activities', 'New Product Recommendations', and so on.Make sure that the group name you set for a set of Banners you want to display in a specific area on the homepage is the same and easily recognizable; this is the basis for achieving precise calls.

Step 2: Identify the target group name

After setting up the group in the background, it is crucial to remember the exact name you have set for the group. For example, if you have set a group name as 'Home Carousel', then in the template,typeThe value of the parameter should be `

Related articles

What is the role of the `item.Alt` field in the `bannerList` tag for SEO, and how to set it?

As an experienced website operation expert, I am more than happy to delve into the importance of the `bannerList` tag's `item.Alt` field in the AnQi CMS for website SEO and how to set it up effectively.In modern website operations, images are not only visual elements, but they also carry important information transmission functions, especially in search engine optimization (SEO).

2025-11-06

How to correctly reference the image address of the home page Banner (`item.Logo`) in the template?

As an experienced website operations expert, I am well aware of the importance of the website homepage banner.It is not only the "face" of the website, carrying the brand image and core promotional information, but also the first visual point for users to enter the website.For users of AnQiCMS, how to efficiently and accurately refer to these banner images in templates, especially the image address `item.Logo` contained within them, is a common and basic requirement in daily operations. Today

2025-11-06

How to set the image link (`Link`) for each Banner in `bannerList`?

As an experienced website operations expert, I am well aware of the importance of every detail for website user experience and operation effectiveness.The banner (Banner) serves as the 'face' of the website, not only carrying the responsibility of beauty, but also as a key point for guiding users and conveying core information.In an efficient and flexible system like AnQiCMS, setting precise image links (`Link`) for each Banner is the basis for achieving this goal.

2025-11-06

How to use `for` loop to iterate over multiple home page Banner items obtained from `bannerList`?

In modern web design, the homepage banner is undoubtedly an important window to attract users' attention and convey core information.A dynamic and beautiful banner area can greatly enhance the visual appeal and user experience of a website.As an experienced website operation expert, I am well aware of the powerful and flexible content management of AnQiCMS (AnQi CMS).

2025-11-06

How to call the home page banner data of different sites under multi-site management?

AnQi CMS as an efficient and flexible content management system, its multi-site management function is undoubtedly a powerful assistant for many enterprises and operators to improve efficiency and broaden their business scope.How to cleverly call content between different sites in a multi-site architecture, especially for key visual elements like the home page banner, is a common problem in website operation.Today, let's delve into how to accurately call the homepage Banner data from different sites in the multi-site management environment of AnQiCMS using the `bannerList` tag.

2025-11-06

How to determine if the current Banner in the loop is the first item in the homepage Banner list (`forloop.Counter == 1`)?

AnQiCMS is a content management system designed with user experience as the core concept, providing great flexibility in template customization and content presentation.For website operators and front-end developers, how to finely control the display of page elements is an important aspect of improving user experience and achieving differentiated design.

2025-11-06

Why did the homepage banner not display when I used the `bannerList` tag in the template?

In the operation practice of AnQi CMS, there is sometimes a headache problem: even though the `bannerList` tag has been used in the template, the Banner picture on the homepage still does not appear.This is like a meticulously prepared opening animation, but it stalls at the critical moment.As an experienced website operations expert, I am well aware of this trouble. Today, let's work together to strip away the layers and find the root cause of the problem, and treat it accordingly.Firstly, we need to be clear about one thing

2025-11-06

How to display the Banner data obtained from the `bannerList` tag (such as `item.Description`) on the front page?

As an experienced website operations expert, I am happy to provide you with a detailed explanation of the usage of the `bannerList` tag in Anqi CMS, and guide you on how to elegantly display Banner data on the front page, especially those descriptive information with expressive content, such as `item.Description`."urls"}--- ### How to cleverly display the website facade: In-depth analysis and practical application of the `bannerList` tag in Anqi CMS The homepage Banner of a website is like the facade of a store, carrying the function of attracting visitors and conveying core information

2025-11-06