How to display the website name, Logo, filing number, and copyright information on AnQiCMS website with the `system` tag?

When setting up and operating a website, the website's name, logo, filing number, and copyright information are important elements that constitute the professional image and legality of the website.They are not only the identity of the website, but also the foundation of user trust.systemLabel.

This article will delve into how to use the AnQiCMS websitesystemTags, flexibly display the website name, Logo, filing number, and copyright information, helping you easily create a professional and standardized online image.

One, Information Entry: Background Settings are Basic

Before Starting to UsesystemBefore calling these tags, we need to ensure that this content has been configured in the AnQiCMS backend management system. These core information are usually concentrated in“Background Settings” -> “Global Function Settings”.

Here, you can find and fill in the following key fields:

  • Website Name (SiteName)This is the brand name of your website, which will be displayed in the browser title bar or in a prominent position on the page.
  • Website Logo (SiteLogo)Upload your brand logo image, which is typically the visual core of the website.
  • Record number (SiteICP)If you operate a website in mainland China and have completed the recordal, please fill in your ICP recordal number here.
  • Copyright Information (SiteCopyright)[en] Typically displayed at the bottom of the website, containing copyright statements, years, and other information.

In addition, AnQiCMS also allows you to add in the "Global Feature Settings" [en].Custom ParametersThis means that if the default provided fields do not meet your specific needs, you can create new parameters, such as a special slogan or promotional phrase, which can also be passed throughsystemtags to call.

Two, Front-end Call:systemFlexible Use of Tags

AnQiCMS templates use syntax similar to Django template engine,systemThe tag is one of them, allowing developers to easily obtain and display global information configured in the background on the website front-end template.

systemThe basic usage of the tag is:{% system 变量名称 with name="字段名称" %}.nameThe parameter is crucial, as it specifies the specific information you want to call.

Next, let's see how to call each of the core information mentioned earlier:

1. Website Name (SiteName)

The website name is typically used in the title, header, or any place where branding needs to be identified.

Example Usage:

{# 直接输出网站名称 #}
<h1>欢迎来到 {% system with name="SiteName" %}</h1>

{# 将网站名称赋值给变量再使用,常用于组合其他文本 #}
{% system currentSiteName with name="SiteName" %}
<title>{{ currentSiteName }} - 您的专业网站</title>

2. Website Logo (Site Logo)

The website logo is the visual symbol of the website, usually displayed in the form of an image.

Example Usage:

{# 直接输出Logo图片,并结合网站名称作为alt属性,提升SEO和可访问性 #}
<a href="/">
    <img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" class="site-logo">
</a>

{# 将Logo地址赋值给变量再使用 #}
{% system logoUrl with name="SiteLogo" %}
<style>
    .header-logo {
        background-image: url('{{ logoUrl }}');
    }
</style>

3. Website Record Number (SiteIcp)

The record number is a proof of legal operation of a website, which is usually placed at the bottom of the website and linked to the record query platform of the Ministry of Industry and Information Technology.

Example Usage:

{# 显示备案号并自动添加工信部链接 #}
<p>
    <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">
        {% system with name="SiteIcp" %}
    </a>
</p>

Hererel="nofollow"andtarget="_blank"It is a good practice for SEO and user experience.systemLabels will directly output the text of the record number you fill in the background.

4. Copyright Information (SiteCopyright)

The copyright information declares the ownership of the website content and is also common in website footers. Since the copyright information may contain HTML tags (such as&copy;Symbols, links, etc., should be paid special attention to when used.

Example Usage:

{# 将版权信息赋值给变量,并使用 |safe 过滤器防止HTML内容被转义 #}
{% system copyrightInfo with name="SiteCopyright" %}
<div class="footer-copyright">
    {{ copyrightInfo|safe }}
</div>

{# 如果版权信息仅为纯文本,也可直接输出 #}
<p class="copyright-text">版权所有 &copy; {% system with name="SiteCopyright" %}</p>

Please note|safeThe use of filters. If your copyright information includes HTML code during the background configuration (for example<a href="...">条款</a>or&copy;)|safeEnsure that these HTML codes are correctly parsed by the browser and not displayed as plain text.

5. Call custom parameters

If you have added a custom parameter in the 'Global Feature Settings' on the backend, for example a parameter namedSiteSloganyou can call it like this:

Example Usage:

{% system mySlogan with name="SiteSlogan" %}
<p class="site-slogan">{{ mySlogan }}</p>

This demonstratessystemThe powerful extensibility of tags allows you to flexibly display more customized content according to the personalized needs of your website.

Summary

AnQiCMSsystemA tag provides a concise and powerful solution for displaying the core information of a website. By managing these informations uniformly in the background, and utilizingsystemLabels can be flexibly called in templates, ensuring consistency in website brand image, accuracy of content, and convenience of operation.Whether beginners or experienced developers, can easily get started and efficiently complete the configuration and display of website basic information.


Common Questions (FAQ)

1. Why is my logo image or copyright information not displaying correctly?Please check if the corresponding field in the "Global Function Settings" of AnQiCMS backend has been filled in and saved.For the Logo image, confirm that the path of the uploaded image is correct and accessible.&copy;symbols, etc.), make sure you have used the template correctly when calling it.|safeFilter, for example{{ copyrightInfo|safe }}To prevent HTML code from being escaped as plain text.

2. If I want to display different website names or Logos on different pages of the website,systemcan the tag still do that? systemTags are mainly used to call the global settings of the website, which means that the same information will be displayed throughout the site. If you need to display different website names or Logos for specific pages, you may need to combine the 'Homepage TDK Settings' tag of AnQiCMS.tdkSet the page title by using the ) or by customizing the page template and related variables for finer control, rather than directly modifyingsystemLabel output.

3. Website record numberSiteIcpIs the link generated by the tag fixed? Can I customize the jump link of the record number? SiteIcpThe tag will only output the text of the record number you fill in the background. In the template example, to comply with the norms of domestic websites, we usually manually add a link to the MIIT record query website for it.https://beian.miit.gov.cn/The link. This link is hardcoded in the template, so if you have special record query address requirements, you can directly modify the template in<a>Tagshrefproperties.