How to display system-level configurations such as the website logo, filing number, copyright information, etc.

The brand identity, legal statements, and core contact information of a website, such as the logo, filing number, and copyright information, are an indispensable part of the professional image of the website.They not only convey trust and standardization to visitors, but are also important for search engine optimization and legal compliance.In Anqi CMS, managing and displaying these system-level configurations becomes extremely intuitive and efficient.

Backend settings: The 'Control Center' for website information

SecureCMS centralizes these core website information in the background's "Global Settings", making management clear at a glance.

First, you can log in to the Anqi CMS backend management interface, find and click on "Backend Settings" in the left navigation bar, and then select "Global Settings".This assembles the most fundamental and important system-level configuration items of the website.

  1. Website Logo (SiteLogo)The website's logo is the core of the brand image. On the "Global Settings" page, you will see the item "Website Logo".Click the upload button to upload your meticulously designed logo image and apply it to the website.The AnQi CMS usually provides image management functions, you can select from the uploaded image library, or directly upload new images.

  2. Website Record Number (SiteIcp)For websites operating in mainland China, the filing number is a legal requirement.In the "Record Number" field, you only need to fill in your website record number, for example, "Guangdong ICP preparation xxxxxxxx number".The AnQi CMS is usually automatically generated to call the front-end template, which links to the MIIT record query website to ensure compliance.

  3. Copyright Information (SiteCopyright)Copyright information is usually found in the footer of a website, stating the ownership of the content.In the 'Copyright Content' field, you can freely fill in your copyright statement, for example, “©2023 Your Company Name. All Rights Reserved.If you wish to have the year automatically updated, Anqi CMS also provides a convenient template tag to achieve this function.

In addition to the above core information, you will also see other important configurations in the "Global Settings", such as:

  • Website Name (SiteName)This is usually used for website titles and logosaltproperties and other places where the website name needs to be displayed
  • Website Home Page Address (BaseUrl)This is the root domain or access address of the website, which is crucial for generating correct internal links and resource paths.
  • Mobile URL (MobileUrl)If your website has a separate mobile domain, you can set it here.
  • Template Static File URL (TemplateUrl)This address is used to build the path of static resources such as CSS, JS, images, and so on referenced in the template.
  • Custom parameterIf the existing fields do not meet your specific needs, for example, if you want to add a specific website slogan or customer service hotline, you can add new configuration items through "Custom Settings Parameters", name and assign them values, which greatly enhances the flexibility of the system.

Front-end display: Let information leap onto the screen

In AnQi CMS, displaying the system information configured on the backend on the website front end is very simple. This mainly depends on its powerful template tag system, especially{% system %}Label. This tag helps you easily retrieve and display all the information defined in the "Global Settings" in the template.

You can do this in the template file (such as usually located intemplate/您的模板目录/partial/footer.htmlThe footer file orbase.htmletc.) to call this information:

  1. Show website logo: You may need to display the logo at the header or footer of the website. Combine the website name asaltattribute, and write it like this:

    <img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" />
    

    here,srcThe attribute obtained the address of the uploaded Logo imagealtThe attribute obtained the website name, which is helpful for SEO and accessibility

  2. Display the filing numberThe record number usually contains a link to the MIIT website. Here is a typical call example:

    <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>
    

    rel="nofollow"The attribute tells the search engine not to track this link,target="_blank"then the link will open in a new window.

  3. Display copyright information: Copyright information typically includes the company name and year. To automatically update the year, you can use{% now "2006" %}tags to get the current year:

    <div>
        {% system with name="SiteCopyright" %} &copy; {% now "2006" %}.
    </div>
    

    Please note that if your copyright content already includes the year, you can omit it{% now "2006" %}. If the 'Copyright Content' field supports HTML and you have filled in HTML content in the background, then when outputting in the front-end, it may be necessary to use{{ SiteCopyright|safe }}to prevent the HTML from being escaped.

  4. Build the basic link and static resource path of the website:BaseUrlandTemplateUrlThe tag is very useful when building internal links and introducing static resources in the website:

    <link href="{% system with name="TemplateUrl" %}/css/style.css" rel="stylesheet">
    <a href="{% system with name="BaseUrl" %}">返回网站首页</a>
    
  5. Invoke custom parameters: If you have added a custom parameter in the background "Global Settings", such as one namedHelpUrlhelp center link, you can call it like this:

    <a href="{% system with name="HelpUrl" %}">获取帮助</a>
    

Practice exercise: A typical footer layout

By using the above tags, you can easily build a footer that includes all the necessary system information. For example:

<footer>
    <div class="container">
        <div class="footer-logo">
            <a href="{% system with name="BaseUrl" %}">
                <img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" />
            </a>
        </div>
        <div class="footer-info">
            <p>{% system with name="SiteCopyright" %} &copy; {% now "2006" %}.</p>
            <p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a></p>
            <p>联系我们:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></p>
            {%- system customFooterText with name="CustomFooterText" %} {# 假设您自定义了一个页脚文本参数 #}
            {%- if customFooterText %}
            <p>{{ customFooterText|safe }}</p>
            {%- endif %}
        </div>
    </div>
</footer>

Through the above content, you can see that Anqi CMS, through centralized background configuration and flexible template tags, makes the management and display of system-level configurations such as website Logo, filing number, copyright information, etc., simple and powerful.This not only enhances the professionalism of the website, but also greatly reduces the workload of the website operator.

Frequently Asked Questions (FAQ)

  1. Q: Why didn't the front page update immediately after I modified the Logo or filing number in the background?A: This is usually caused by caching. First, you can try to click the 'Update Cache' feature in the AnQi CMS backend to clear the system cache.Secondly, the browser may also cache website content, you can try clearing the browser cache or accessing the website in incognito mode to view the updated effect.

  2. Q: If my website has multiple language versions, can each version set a different Logo or filing number?A: The AnQi CMS supports multi-site management and multilingual functionality. If you create independent sites for different languages (such asen.yourdomain.comandcn.yourdomain.comThen each site can configure independent Logo, filing number and other information in their respective "global settings".If you want to implement multilingualism through template logic on the same site, you can consider using 'custom settings parameters' in conjunction with conditional judgments in the template to achieve this.

  3. Q: Besides Logo, filing number, and copyright information, how can I obtain common system-level information through{% system %}tags?A:{% system %}The tag is very powerful, in addition to the information mentioned above, you can also obtain