Home slide
Home slide
The home slide is used to maintain the home Banner image and its links, ALT and description, managed by groups, and provided for template calling and display.
Entry Path
Top menu of the background → 'Settings' → 'Home Slide'. Actual address:/system/setting/bannerrequires administrative privileges(canAdmin)
Function description
Page displays Banner list by group (the default group in the source code isdefault). It supports adding, modifying, deleting, and previewing. Each Banner includes images, links, ALT text, and descriptions.
Screenshot of the interface

Setting item description
| Setting items | function | Value / Default | How to select / Fill in suggestions | Impact / Note |
|---|---|---|---|---|
| Slide Group | Determines which position this group of Banners belongs to | select, can be added within the dropdown; defaultdefault[Source Code +实测] |
When there are multiple location carousels, name them according to the location, such ashome/activity |
Template fortypeSpecify the group, case sensitive; fallback on the front end if not submitteddefault[Source code] |
| Slide image | Banner image | Image upload, no default [source code] | Upload according to the template size; maintain the same aspect ratio in the same group | Large images affect loading, it is recommended to enable Webp and compression |
| Link Address | Click the Banner jump address | URL, leave blank to not be clickable [source code] | Enter the complete URL or internal **path | Whether the external link opens a new window is determined by the template |
| ALT | Image alternative text | Text, No Default [Source Code] | Concise description of the image content | Beneficial for SEO and accessibility; the source code has compatible fieldstitleBut the front end is not exposed |
| Introduction | Banner text description | Text, No Default [Source Code] | Write a brief activity description | Whether to output is determined by the template |
Detailed explanation of configuration items
Slide Group
Condition for occurrence: Page top grouping label + drop-down 'Slide Group' in the newly added popup [measured].
Source code defaultdefault(config/setting.go:111,116,120); New group name must be filled in, and can be added directly in the drop-down box [source code].
Recommended value: Unit location site maintainsdefault; Multi-carousel positions are named according to location, templates are used{% bannerList banners with type="分组名" %}Call.
Consequences of filling in incorrectly: TemplatetypeIf the group name is inconsistent (including case), the data will not be read.
Operation steps
- Enter 'Settings → Home Slide Show'.
- Select a group and click 'Add'.
- Upload an image and fill in the link, ALT, and description.
- Click preview to confirm the effect and then save.
- Click 'Edit' when you need to modify, and stop using 'Delete' (there is a confirmation pop-up).
Applicable scenarios and suggestions
- Multi-position carousel: Create separate groups for the home page and event page, templates are called by groups, and they do not interfere with each other.
- Image size: Use the same aspect ratio for the banners in the same group to avoid page jumping during the carousel.
Front-end call example
{% bannerList banners with type="default" %}
{% for item in banners %}
<a href="{{ item.Link }}" target="_blank">
<img src="{{ item.Image }}" alt="{{ item.Alt }}" />
</a>
{% endfor %}
{% endbannerList %}
Do not passtypeIt will output the default group. Available within the loop.forloop.CounterDetermine if it is **Zhang.
Points to note
- The group name must be consistent with the
typecall template, case sensitive. - There will be a confirmation pop-up when deleting Banner, and one less data will be displayed on the front-end immediately after deletion.
- If the front-end still displays the old picture after the picture URL is changed, clear the cache.
Related documents
- Global Settings
- Image Resource Management
- template tag manual.
bannerListTag