Can I set multiple Banner groups in AnQiCMS and display them at different positions separately?

Calendar 👁️ 63

In AnQiCMS, you can completely set up multiple Banner groups and display them flexibly in different positions according to the website layout.AnQiCMS provides a multi-dimensional way to manage and call these important visual elements to help you better organize website content and attract visitors.

One, the core concept of Banner management in AnQiCMS

AnQiCMS demonstrates high flexibility and customization in Banner management.It not only allows you to configure exclusive Banner carousels for specific parts of the website (such as category pages or single pages), but also supports creating and naming different Banner groups through a unified Banner management mechanism, so that they can be called at any location on the website.This design is aimed at meeting various content display needs, whether it is the large carousel on the homepage, the thematic recommendation on the article list page, or the promotional information on the product detail page, a suitable solution can always be found.

Two, how to set up Banner in AnQiCMS backend: two main methods

AnQiCMS offers two main banner setting methods to accommodate different management granularity and display scenarios.

1. Add a Banner for Specific Pages and Categories

For category pages and independent single pages on the website (such as "About Us", "Contact Information", etc.), AnQiCMS allows you to upload exclusive Banner images directly in the editing interface of these pages.

  • Category Banner SettingsIn the background, go to the "Content Management" -> "Document Category" page, and when editing or creating a new category, you will see an option for a "Banner Image".Here, you can upload multiple images, which will be used as the exclusive Banner carousel for the category page.The system will suggest using pictures of the same size to maintain consistency in display.
  • Single Page Banner SettingsSimilarly, when editing or creating a single page under "Page Resources" and "Page Management", there is also a "Banner Image" area.You can upload multiple images for each single page, and these images will be used as the carousel banner for that page.

This approach's advantage lies in the close binding of the Banner with specific content entities, making it convenient for management and content association.

2. Create and manage custom Banner groups

In addition to the page and category-specific Banners, AnQiCMS also allows you to create generic, named Banner groups. Although the document does not directly display the specific menu path for "Banner Group Management", it can be inferred from the design of the template tags (especiallybannerListin the labeltypeParameters can be inferred, there is a centralized Banner management entry there:

  • Define the group nameFor example, you can create different groups named "Home Main Carousel", "Product Page Promotion", "Sidebar Advertisement", etc.
  • Upload images to the group: Upload the pictures you want to display in a specific group to the corresponding group, and you can set links, descriptions, and Alt text for each picture.

In this way, you can manage banners that are not attached to a specific category or page uniformly, and call these groups at any required location on the website.

Three, call the Banner on the website front-end as needed: flexible template tags

AnQiCMS through intuitive template tags, allows you to easily call different types of Banners on the website front-end.

1. Call page/category exclusive Banner

When you need to display the exclusive Banner on the category page or single page, you can use the corresponding detail tag to obtain the image data.

  • Call category BannerIn the template file of the category (such as{分类模型}/list.htmlIn it, you can usecategoryDetailGet the details of the current category by tag, andImagesField to get the list of banner images.

    {% categoryDetail categoryImages with name="Images" %}
    {% if categoryImages %} {# 判断是否有Banner图 #}
    <div class="category-banner-slider">
        {% for image in categoryImages %}
        <img src="{{ image }}" alt="分类Banner" />
        {% endfor %}
    </div>
    {% endif %}
    
  • Call single page BannerIn the single-page template file (for examplepage/detail.htmlIn it, you can usepageDetailtag to get the details of the single page and throughImagesField to get the list of banner images.

    {% pageDetail pageImages with name="Images" %}
    {% if pageImages %} {# 判断是否有Banner图 #}
    <div class="page-banner-slider">
        {% for image in pageImages %}
        <img src="{{ image }}" alt="单页面Banner" />
        {% endfor %}
    </div>
    {% endif %}
    

2. Call the custom Banner grouping

You can use the general Banner group created in the backgroundbannerListCall the tag.

  • Call the default groupIf you do not specify a specific group name for Banner, it will default to the "default" group.

    {% bannerList banners %} {# 调用默认分组Banner #}
    <div class="default-banner-slider">
        {% for item in banners %}
        <a href="{{item.Link}}" target="_blank">
            <img src="{{item.Logo}}" alt="{{item.Alt}}" />
            <h5>{{item.Title}}</h5> {# 如果有标题内容 #}
        </a>
        {% endfor %}
    </div>
    
  • **Call

Related articles

How to set and call the thumbnail of an article, category, or single page, and control its display size?

In website operation, images are not only an important part of content attractiveness, but also a key factor affecting page loading speed and user experience.Especially for articles, categories, or single-page content, an appropriate thumbnail can quickly catch the visitor's attention and guide them to click for more in-depth information.In Anqi CMS, setting and calling these thumbnails, and flexibly controlling their display size, is actually simpler and more efficient than imagined.### Easily manage thumbnails on the backend: Upload and intelligent extraction First, let's learn how to set thumbnails for your content on the Anqi CMS backend

2025-11-08

How to enable lazy loading of images in article content to speed up page loading and improve user experience?

In website operation, page loading speed and user experience are always the core concerns.Images are often a major component of web content and also one of the main factors affecting page loading speed.A high-definition image can enhance the visual effects, but too many images without proper handling will slow down the website speed and make visitors hesitate.Fortunately, AnQi CMS has provided us with a very convenient image lazy loading (Lazy Load) feature, which helps us effectively solve this problem.In simple terms, lazy loading of images is about not loading all images at once when the page loads

2025-11-08

How to configure AnQiCMS to automatically convert uploaded images to WebP format for optimized display performance?

The loading speed of a website is one of the key factors in user experience and search engine optimization, and images, as an important part of web content, often occupy most of the time it takes to load a page.Convert images to more efficient formats like WebP, which can significantly reduce the size of image files, thereby improving the display performance of websites.AnQiCMS as a content management system that focuses on performance and user experience, is built with the feature of automatically converting images to WebP format.This article will give a detailed introduction on how to configure this feature in AnQiCMS, making your website images automatically optimized during upload

2025-11-08

How to embed Json-LD structured data in a page to enhance the rich media display of search engine results?

In today's highly competitive online environment, it is crucial to make your website content stand out in search engine results pages (SERP) to attract user clicks.And JSON-LD structured data is an important tool to achieve this goal.By embedding Json-LD in the page, you can provide clear information about the page content to search engines, thereby having the opportunity to display in search results in a richer form (such as star ratings, product prices, article thumbnails, etc.), which is what we commonly refer to as 'rich media results'

2025-11-08

How to display the user comment list on the article detail page and support

In website operation, the user comment feature on the article detail page is a key factor in enhancing user interaction and website activity.AnQiCMS (AnQiCMS) provides powerful and flexible comment management capabilities, allowing you to easily display comment lists on article detail pages, support user comment submissions, and even further enhance comment functions. ### 1. Preparation: Understanding the Comment Mechanism and Template Structure In Anqi CMS, each article can independently enable the comment function.When the user submits a comment on the article detail page, these comments will be associated with the corresponding article.To implement the display and submission of comments

2025-11-08

How to customize the display layout of the article detail page in AnQiCMS?

In AnQi CMS, the layout customization of the article detail page is a key factor in improving the user experience and display effect of the website.Benefiting from its flexible template mechanism, we can easily create unique article detail pages according to specific needs.Below, we will delve into the process of locating template files, core data calls, and how to use advanced features to achieve personalized layouts, among other aspects.### Understand the template working mechanism of AnQi CMS The template system of AnQi CMS is the foundation of its flexibility, it uses syntax similar to Django template engine

2025-11-08

How to make AnQiCMS website content adaptable to mobile display?

AnQiCMS is committed to providing users with an efficient and flexible content management experience, of course, also fully considering the display needs of the website on different devices, especially the increasingly important mobile display.Let your AnQiCMS website content adapt to mobile devices easily, it's not a difficult thing.AnQiCMS provides various flexible strategies to ensure your website offers an excellent user experience on any device.### The Flexible Adaptation of AnQiCMS AnQiCMS deeply understands the diverse display needs of mobile devices

2025-11-08

Under multi-site management, how can you ensure that each site displays its content independently?

How to ensure that the content of each site can be displayed independently when managing multiple websites is a common challenge faced by many content operators.Fortunately, AnQiCMS (AnQiCMS) took this into consideration from the very beginning, through a clever mechanism, allowing content to be managed uniformly across multiple site environments while also remaining independent and not interfering with each other. ### The core mechanism of AnQi CMS for independent content display The reason why AnQi CMS can easily handle the independent display of content across multiple sites lies in the physical and logical dual isolation provided for each site.View from a physical perspective

2025-11-08