When operating a website, the website's name, Logo, record number, and copyright information are core elements that constitute the brand image, build user trust, and meet legal compliance requirements.For users who use AnQiCMS, the system provides an intuitive and flexible way to manage and display this information, making your website not only rich in content but also professional and perfect in detail.
1. Centralized Management: Configure these key information in the background
You can find them through the following path: Login to the AnQi CMS backend -u003e Select the "Backend Settings" from the left menu bar -u003e Click "Global Function Settings".
Here, you will see a series of configuration items related to the global information of the website:
- Website Name:This is the brand name of your website, as well as the page title (
<title>Label) is an important part. Enter your company or brand name here, such as "AnQi CMS Official Website." - Website Logo:Used to upload your website logo image. Once uploaded, it can be called and displayed at any location on the website, and is crucial for the visual identity of the website.
- Record number:For websites operating in mainland China, the filing number is an essential compliance information.Fill in your ICP record number here, for example, 'Guangdong ICP No. xxxxxxxx'.The system will automatically handle the link format during the front-end display.
- Copyright information:The copyright statement at the bottom of the website usually includes the year and rights reserved information, such as “© 2023 AnQi CMS.All Rights Reserved.”
In addition to these default configuration items, if you have special brand information that needs to be displayed, you can also use 'Custom settings parameters' to add more exclusive fields to meet personalized needs.
English, flexible presentation: Call this information in the template
Configure the background information first, and the next step is how to display them on the website's frontend template.The Auto CMS adopts a template engine syntax similar to Django, obtaining backend data through specific "tags".
For the global information of the website, we mainly usesystemLabel. This label can easily retrieve the various data you have configured in the "Global Function Settings".
1. Display website name
The website name is not only used for headers, footers and other locations, but also a key component of page titles in Search Engine Optimization (SEO).
You can use the template to display the website namesystemTag, and specifyname="SiteName":{% system with name="SiteName" %}
on the page<title>in the tag, you may want to display the title of the current page and the website name at the same time. At this time, you can usetdk标签并结合siteName=trueThe parameter, which lets the system automatically append the website name as a suffix to the page title:<title>{% tdk with name="Title" siteName=true %}</title>
2. Display the website logo
The website logo is the visual symbol of the brand, usually placed in the header of the website.
PasssystemTag, you can get the URL address of the Logo image and then embed it into<img>Tags inside:<img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" />Here we still utilizeSiteNameAs the imagealttext, enhancing accessibility and SEO-friendliness.
3. Display the record number
The record number is usually placed at the footer of the website and linked to the MIIT record management system.
UsesystemTag, and specifyname="SiteIcp"You can obtain the record number text:{% system with name="SiteIcp" %}To achieve click-through, you can place it in:<a>Inside the tag:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>
4. Display copyright information
Copyright information is usually also located at the footer of the website, indicating the ownership of the website content.
PasssystemLabel, specifyname="SiteCopyright"You can get the copyright content:{% system with name="SiteCopyright" %}If your copyright information contains HTML code (such as bold, links, etc.), to ensure they are parsed correctly and not displayed as escaped, you can add them when calling|safeFilter:{% system siteCopyright with name="SiteCopyright" %}{{ siteCopyright|safe }}An excellent practice is to first check if the copyright information exists before rendering:{%- system siteCopyright with name="SiteCopyright" %}
{%- if siteCopyright %}<p>{{ siteCopyright|safe }}</p>{% endif %}
Three, integrate them into the template: an example footer
To better understand the actual application of these tags, we can imagine a fragment of an HTML footer of a website that includes all the above information:
<footer class="main-footer">
<div class="container">
<div class="footer-content">
<a href="{% system with name="BaseUrl" %}" class="footer-logo">
<img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" loading="lazy">
</a>
<p class="copyright-text">
© {% now "2006" %} {% system with name="SiteName" %}. All Rights Reserved.
</p>
{# 判断是否存在自定义版权信息并安全输出 #}
{%- system customCopyright with name="SiteCopyright" %}
{%- if customCopyright %}<p class="custom-copyright">{{ customCopyright|safe }}</p>{% endif %}
{# 判断是否存在备案号并链接到工信部 #}
{%- system icpNumber with name="SiteIcp" %}
{%- if icpNumber %}
<p class="icp-info">
<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{{ icpNumber }}</a>
</p>
{%- endif %}
</div>
</div>
</footer>
In this example,{% now "2006" %}Labels are used to dynamically display the current year, ensuring that the copyright year is always up to date, avoiding the trouble of manual updates.
By following these steps, you can easily manage and display the name, Logo, filing number, and copyright information of your website in the Anqi CMS, adding professionalism and credibility to your website.
Common Questions (FAQ)
Q1: Why doesn't the front page update immediately after I modify the website name or Logo in the background? A1:This is usually due to caching.The auto CMS will use caching to improve website access speed.You can try clearing the browser cache, or click the "Update Cache" feature in the Anqi CMS backend (usually at the bottom of the left menu or the upper right corner) to force update the website cache.
Q2: Can I display different Logos or website names on different pages of the website? A2:By default, the Logo and website name in the "Global Function Settings" are globally unified.If you need to display different logos or names on specific pages, you can consider using the "Custom Fields" feature of Anqi CMS.For example, add a 'Page Logo' custom field for a single page or category, and then call the custom field's Logo in the template of that page with priority. If not, it will fallback to the global Logo.This requires some basic template modification skills.
Q3: If I need to add other compliance information (such as public security filing number) in addition to the default filing number, what should I do?
A3:The 'Global Function Settings' of AnQi CMS supports adding 'Custom Setting Parameters'. You can add a new parameter here, for example,name="GonganIcp",value="你的公安备案号"and then follow the{% system with name="GonganIcp" %}The way to call and display in the template.