AnQiCMS provides an intuitive and powerful way to manage and display the global information of the website, such as the website logo, filing number, and copyright statement.This information is not only an important part of the website's brand image, but also concerns the legal and compliant operation of the website.Next, the details of how to set and utilize these global information will be fully explained.
Perform global information settings in the background
All website global information is concentrated in the "Global Function Settings" of AnQiCMS backend. Simply log in to the backend and navigate to the left-hand menu.“Backend Settings”, and then click.“Global Function Settings”You can find the relevant options here.
On this page, you can easily configure the following key global information of the website:
Website NamePlease fill in the brand name or full name of your website.It usually appears as part of the web page title on the browser tab and is very important for website recognition and search engine optimization (SEO).
Website LogoClick the upload button, you can select and upload the website's Logo image.This Logo will be displayed on various pages of the website and is the core element of the brand's visual image.
Filing NumberIf your website has been registered in mainland China, you can enter your registration number here (for example:京ICP备12345678号).AnQiCMS will automatically convert it into text with a link to the Ministry of Industry and Information Technology filing management system, convenient for users to query and verify.
Copyright InformationThis field is used to input the copyright statement of the website, which is usually displayed in the footer of the website. You can enter plain text, or you can include simple HTML tags to beautify the display.
Custom ParametersIn addition to the aforementioned built-in fields, AnQiCMS also allows you to add custom parameters as needed.This means that if there is some other global information at the website level that needs to be called in the template, you can define it here flexibly.
After completing the settings, remember to click the save button to ensure that all changes take effect.
Display global information in the frontend template
AnQiCMS's front-end template uses a syntax similar to Django template engine, calling the global information set in the background through specific tags. These global information is usually found in the common parts of the website (such as the page header)bash.htmlOr footerfooter.html) to ensure consistent display throughout the site.
Mainly used is{% system %}Tags, throughnameParameters specify the specific fields to be called. Here is an example of calling commonly used global information:
Display the website LogoThe website Logo is usually displayed in image form, it is necessary
<img>Label.<a href="{% system with name='BaseUrl' %}" class="logo"> <img src="{% system with name='SiteLogo' %}" alt="{% system with name='SiteName' %}"> </a>Here,
srcThe attribute calls the Logo image address set in the backgroundaltThe attribute then called the website name as the alternative text for the image, which is very helpful for image SEO and accessibility.BaseUrlThe tag is used to obtain the website home page address, ensuring that clicking the Logo can return to the home page.Display the website nameThe website name can be displayed separately or used as the page title.
<title>is part of.<title>{% tdk with name='Title' siteName=true %}</title> <h1><a href="{% system with name='BaseUrl' %}">{% system with name='SiteName' %}</a></h1>In
<title>in the tag,{% tdk with name='Title' siteName=true %}Can intelligently combine the page title with the website name for display. You can also directly use it in the page content.{% system with name='SiteName' %}To display the website name.Display the filing numberThe record number usually contains a link to the MIIT record query website for user verification.
<p> <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank"> {% system with name='SiteIcp' %} </a> </p>{% system with name='SiteIcp' %}It will output the record number you filled in the background.It displays copyright information.Copyright information is usually included in the website footer and may contain some HTML tags (such as
©or<strong>), so it may be necessary|safeto use a filter to prevent HTML from being escaped.<p>{% system with name='SiteCopyright' %}</p> {# 如果版权信息包含HTML,建议使用|safe过滤器 #} <p>{% system siteCopyright with name="SiteCopyright" %}{{siteCopyright|safe}}</p>Pass
|safeFilter that ensures the HTML content entered in the background can be correctly parsed and rendered by the browser.Invoke custom parametersIf you add a custom parameter in the background "Global Function Settings", such as a parameter named
ContactEmailyou can also call it through{% system %}the tag.<p>联系邮箱:{% system with name='ContactEmail' %}</p>This demonstrates the powerful flexibility of the AnQiCMS template system, which can easily be expanded and adapted to meet different website needs.
Summary
Through AnQiCMS, setting up and managing the global information of a website is a simple and efficient process.Perform centralized configuration in the background and accurately display it on the frontend through intuitive template tags, ensuring that key elements such as the website's Logo, filing number, and copyright information are presented uniformly and professionally to visitors.This not only helps to establish a brand image and enhance user trust, but also ensures the compliance of website operations.
Common Questions and Answers (FAQ)
Q1: I modified the Logo or copyright information in the background, but the website front-end did not update immediately, why is that?A1: AnQiCMS In order to improve website access speed, caching mechanism will be enabled.When you modify the global settings in the background, you may need to manually clear the website cache or wait for the cache to be automatically updated before the latest content is displayed on the front end.You can find the 'Update Cache' button at the top of the background, click it to clear all the cache.
Q2: Besides the Logo, filing number, and copyright information, I also want to display the company's address and contact number in the website footer. Can AnQiCMS achieve this?A2: OK.AnQiCMS provides the 'Contact Information Settings' feature under 'Background Settings', where you can fill in contact person, contact phone number, and contact address information separately.{% contact with name='Address' %}and{% contact with name='Cellphone' %}Use tags to call up this information, displaying it in the footer of the website or other required locations.
Q3: How can I adjust the size of my website logo, which sometimes appears too large or too small on certain pages?A3: The display size of the logo is mainly controlled by the front-end CSS styles.The default logo uploaded by AnQiCMS will maintain its original size.If you wish to apply uniform size processing to the Logo, you can go to the 'Content Settings' under 'Background Settings' and adjust options such as 'Thumbnail Processing Method' and 'Thumbnail Size'.<img>Label addwidthorheightPrecisely control the style rules.