How to set and display the global information of AnQiCMS, such as Logo, filing number, and copyright?

AnQiCMS provides an intuitive and powerful way to manage and display the global information of a 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, I will give a detailed introduction on how to set and use these global information.

Set global information in the background

All website's global information is concentrated in the 'Global Function Settings' of the AnQiCMS backend. Simply log in to the backend, navigate to“Background Settings”and then clickGlobal function settingsto find the relevant options.

On this page, you can easily configure the following key global website information:

  1. Website NameEnter your website's brand name or full name. It usually appears as part of the web page title, in the browser tab, and is very important for website recognition and search engine optimization (SEO).

  2. 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.

  3. Record 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 inquire and verify.

  4. Copyright informationThis field is used to enter 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.

  5. Custom parameterIn addition to the above 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 setting up, remember to click the save button to ensure all changes take effect.

Display global information in the front-end template.

AnQiCMS's front-end template adopts a syntax similar to the Django template engine, using specific tags to call the global information set in the background. This global information is usually located in the common parts of the website (such as the page headerbash.htmlor footerfooter.htmlCall it to ensure consistent display throughout the site.

It is mainly used for{% system %}tags, throughnameThe parameter specifies the specific field to be called. Here is an example of calling commonly used global information:

  1. Display website LogoThe website logo is usually displayed in image form,<img>.

    <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 background,altThe attribute then called the website name as the alternative text for the image, which is very helpful for image SEO and accessibility.BaseUrlTags are used to obtain the home page address of the website, ensuring that clicking the Logo can return to the homepage.

  2. Display website nameThe website name can be displayed separately or can also be 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>Tagged,{% tdk with name='Title' siteName=true %}Can intelligently combine the page title with the website name. You can also use it directly in the page content.{% system with name='SiteName' %}To display the website name.

  3. Display the record numberThe record number usually contains a link to the Ministry of Industry and Information Technology 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 on the backend.

  4. Displays copyright informationCopyright information is usually included in the website footer, may contain some HTML tags (such as&copy;or<strong>), so it may be necessary to use|safea filter to prevent HTML from being escaped.

    <p>{% system with name='SiteCopyright' %}</p>
    {# 如果版权信息包含HTML,建议使用|safe过滤器 #}
    <p>{% system siteCopyright with name="SiteCopyright" %}{{siteCopyright|safe}}</p>
    

    By|safeA filter that ensures the HTML content entered in the background can be correctly parsed and rendered by the browser.

  5. Invoke custom parametersIf you add a custom parameter named in the background "Global Feature Settings"ContactEmailyou can also use the parameter,{% system %}Tag to call it.

    <p>联系邮箱:{% system with name='ContactEmail' %}</p>
    

    This showcases the powerful flexibility of the AnQiCMS template system, which can easily be expanded and adapted to meet the needs of different websites.

Summary

Through AnQiCMS, setting up and managing the global information of a website is a simple and efficient process.Configure centrally in the background and display accurately through intuitive template tags on the front end, so that key elements such as the website's Logo, filing number, and copyright information can be presented uniformly and professionally to visitors.This not only helps to establish the brand image, enhance user trust, but also ensures the compliance of website operation.

Frequently Asked Questions (FAQ)

Q1: Why did the website front-end not update immediately after I modified the logo or copyright information in the background?A1: AnQiCMS To improve the speed of website access, caching mechanism will be enabled.After 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 Logo, filing number and copyright information, do I want to display the company's address and contact phone number in the footer of the website? Can AnQiCMS achieve this?A2: Sure. AnQiCMS provides the 'Contact Information Settings' function under 'Background Settings', where you can fill in contact person, phone number, and contact address information.In the template, you can use{% contact with name='Address' %}and{% contact with name='Cellphone' %}Use tags to call up this information and display it in the footer of the website or other required locations.

Q3: How to adjust the website logo if it appears too large or too small on some pages?A3: The display size of the logo is mainly controlled by the front-end CSS style.The default uploaded Logo of AnQiCMS will maintain the original size.If you wish to uniformly process the Logo size, go to the 'Background Settings' under 'Content Settings', adjust options such as 'Thumbnail Processing Method' and 'Thumbnail Size'.Also, you can target the Logo image in the CSS file of the website,<img>tagswidthorheightStyles rules for precise control.