On a website built with AnQiCMS, the logo image is a core element of brand recognition, which can not only enhance the professionalism of the website, but also deepen the impression of visitors on the brand.AnQiCMS provides a simple and intuitive way to set and display your website logo.
Set the website logo: Let the brand identity入驻AnQiCMS
First, to make your website have a unique identity, the first step is to upload the Logo image on the AnQiCMS backend. This process is very direct:
- Login to the AnQiCMS backend:Log in to the website's admin interface using your admin account.
- Enter the global function settings:In the left menu bar of the back-end, you will see an option for 'Back-end Settings'. Click on it. Go in and select the sub-menu 'Global Feature Settings'.
- Upload your Logo:In the "Global Function SettingsThere is usually a button to upload or select an image.Click it, select the logo image file you have prepared on your computer.
- Tip:It is recommended to use PNG format images with a transparent background to ensure that the Logo blends perfectly with websites of different background colors.At the same time, the image size should be moderate, ensuring clarity without affecting page loading speed too much.
- Save settings:After the image is uploaded successfully and the preview is correct, please click the "Save" button at the bottom of the page to make your Logo setting take effect.
This, your Logo image has been successfully stored in the AnQiCMS system.
Display the Logo in the website template: let the brand shine in the foreground
After uploading the logo image to the backend, the next step is to display it on the front page.AnQiCMS uses a flexible template system, you need to edit the website template files to call this Logo./templateFind the template folder you are currently using in the directory and findbash.htmlorheader.htmlthis kind of public header file.
AnQiCMS provides a very practical{% system %}The tag is used specifically to retrieve system-level configuration information, including the website Logo.
Use{% system %}The tag to display the Logo image is very intuitive. You can write the code like this in the template:
<img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" />
Here, name="SiteLogo"Dynamically retrieves the logo image address you uploaded in the background "Global Function Settings" and uses it as<img>label'ssrcattribute value. Andalt="{% system with name="SiteName" %}"The website name you set will dynamically retrieve it as the alternative text for the image, which is not only beneficial for search engine optimization (SEO), but also provides meaningful information to visitors when the image cannot be loaded due to the network or other reasons.
If you are operating AnQiCMS in a multi-site environment and need to call the logo of a specific site, you cansystemadd in thesiteIdParameters. For example, if you want to get the Logo of the site with ID 2, you can write it like this:
<img src="{% system with name="SiteLogo" siteId="2" %}" alt="{% system with name="SiteName" siteId="2" %}" />
After modifying the template file, save your changes.If the front-end page does not update immediately, it may be due to browser cache, you can try to clear the browser cache or force refresh the page.AnQiCMS will also automatically update the system cache to ensure that your latest settings are displayed.
By following these simple steps, your website Logo can be perfectly presented on an AnQiCMS-driven website, adding luster to your brand.
Frequently Asked Questions (FAQ)
1. Why isn't the front page displaying after uploading the Logo?
This is usually caused by several reasons.First, make sure you have uploaded the Logo image and clicked the "Save" button in the background global feature settings.{% system with name="SiteLogo" %}Label to call Logo.Finally, website cache or browser cache may cause the image to not be updated in time. You can try clearing the browser cache or refreshing the page, and you should usually see the latest Logo.
2. What are the recommendations for the size and format of the Logo image?
We recommend using a PNG format with a transparent background for the Logo image, so that it can display well on web pages with different background colors.As for size, there is no absolute standard, but it is usually recommended that the width be between 150px and 300px, and the height between 50px and 100px, depending on your template design.In AnQiCMS' 'Content Settings', you can also find options to automatically compress large images and convert them to WebP format, which can help optimize the loading speed of Logo images.
3. Can each language site of my website have a different logo?
The Logo setting in the "Global Function Settings" of AnQiCMS is for the current site.If you create different language sites in multi-site management, each site can independently set its own Logo.This means you can upload and configure different Logo images for each language version of the website to meet the brand display needs of different regional or cultural backgrounds.When called in the template, the system will automatically identify the logo of the current site.