How to effectively display the site name and Logo configured in the AnQi CMS backend on the front-end page?

Calendar 👁️ 66

In website operation, the name and logo of the site are the cornerstone of the brand image, they are not only an important sign for visitors to identify the website, but also a key to conveying brand value and establishing trust.AnQiCMS as a powerful content management system fully considers this need and provides an intuitive and convenient way to configure and display these core brand elements.Next, let's discuss how to effectively use the site name and Logo configured in AnQiCMS to bring vitality to the front-end page.

One, background configuration: Define the 'front' for your website

On the AnQiCMS backend management interface, the process of setting the site name and logo is very simple and intuitive. This is like setting a unique identity for your website.

First, you need to log in to the AnQiCMS backend, then find the "Background Settings" in the left menu bar, click to enter, and select "Global Function Settings". Here, you will see several key configuration items that are directly related to the brand display of the website:

  • Website NameThis field is the formal name of your website, it will appear in the browser tab, page title (<title>Label) at multiple important locations. A clear and concise website name helps to enhance brand recognition.
  • Website LOGO: You are allowed to upload the website's logo image. It is recommended to upload a high-resolution, appropriate format (such as PNG with transparent background) logo file.A good logo design can attract visitors at a glance and enhance professionalism.

After completing these settings and saving, this information has already been stored in the AnQiCMS system, ready to be called from the front-end template.

Second, front-end call: Make brand elements leap to the screen

After configuring the background information, the next step is to display this information on the front page of the website.The AnQiCMS template system provides a simple and powerful tag, which can easily achieve this.

1. Core Tool:systemTag

AnQiCMS is specially designed to obtain system configuration informationsystemLabel. By this label, we can conveniently obtain the 'website name' and 'website logo' set in the background.

  • Get site nameTo display the website name, you can use the following tag in the template:

    {% system with name="SiteName" %}
    

    This tag will directly output the website name you entered in the background "Global Function Settings".

  • Get the website logo: To display the image address of the website logo, you can use:

    {% system with name="SiteLogo" %}
    

    This tag will output the complete URL of the uploaded logo image.

2. In the template application

As a rule, the site name and logo appear in the top navigation bar (header), footer, and page<body>Tags within the other key areas. Moreover, the website name will also be used in the page title.titleTags are crucial for Search Engine Optimization (SEO).

Let's demonstrate how to integrate these elements in a common HTML structure example:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {# 使用tdk标签获取页面标题,并附加网站名称,这更有利于SEO #}
    <title>{% tdk with name="Title" siteName=true %}</title>
    <!-- 其他CSS、JS引入 -->
</head>
<body>
    <header>
        <div class="container">
            <a href="/" class="brand-link">
                {# 调用后台设置的Logo,并用网站名称作为alt文本,提升可访问性和SEO #}
                <img src="{% system with name='SiteLogo' %}" alt="{% system with name='SiteName' %}" class="site-logo">
            </a>
            <span class="site-name">{% system with name='SiteName' %}</span>
            <!-- 导航菜单等其他头部内容 -->
        </div>
    </header>

    <main>
        <!-- 页面主要内容 -->
    </main>

    <footer>
        <div class="container">
            {# 结合系统年份和网站名称,展示版权信息 #}
            <p>&copy; {% now "2006" %} {% system with name='SiteName' %} 版权所有.</p>
            {# 后台设置的备案号,如果需要也可以展示 #}
            {%- system siteIcp with name="SiteIcp" %}
            {%- if siteIcp %}
            <p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{{siteIcp}}</a></p>
            {%- endif %}
        </div>
    </footer>
</body>
</html>

In the above example, we not only demonstrated how to call the site name and Logo, but also combinedtdktags to build more SEO-friendly page titles, and usednowThe label dynamically displays the current year, keeping the copyright information up to date.

3. Tips for improving user experience and SEO

  • Logo image optimizationThe uploaded logo image size should be moderate and compressed to speed up website loading.AnQiCMS provides the function of enabling Webp image format and automatically compressing large images in the 'Background Settings' -> 'Content Settings'. Reasonably using these settings can further optimize the image loading performance.
  • Responsive DesignEnsure that the Logo displays well on different devices (PC, tablet, mobile). Different sizes or styles can be set for the Logo using CSS media queries.
  • The importance of the Alt attributeIn<img>the tag withalt(for examplealt="{% system with name='SiteName' %}"This is a good web practice. It not only helps search engines understand the content of images, but also provides text descriptions when images cannot be loaded, improving the accessibility of the website.
  • Uniformity of site name and LogoTry to keep the text in the Logo consistent with the "site name" set in the background, which helps to strengthen the brand image.

Summary

AnQiCMS makes it very easy to display the site name and logo configured in the backend on the front-end page.Through intuitive backend configuration and powerful template tags, you can quickly and effectively build a professional, brand-distinguishing website.Remember, these seemingly simple elements are an indispensable part of the website's brand image and user experience.


Frequently Asked Questions (FAQ)

Q1: Why did the logo image I set on the back end not display on the front end?

A1: This usually has several reasons. First, please check if the tag calling the Logo in your template file is correct, for example{% system with name='SiteLogo' %}ofSiteLogoIs the spelling correct? Secondly, confirm that the file path of the uploaded Logo image is correct. If a CDN or image hosting service is used, ensure its accessibility.Finally, try to clear the browser cache and AnQiCMS system cache (there is an option for "Update Cache" at the bottom of the left menu in the background management interface), because the browser may cache old images or templates.

Q2: Can I use different logos on the front end? For example, one for the PC端 and one for the mobile端?

A2: In AnQiCMS 'Global Function Settings'网站LOGOFields usually correspond to only one Logo. If you need to display different Logos for desktop and mobile, you can consider the following two methods:

  1. CSS Media Queries: Refer to two Logo images (one for PC and one for mobile) in the front-end template, and then use CSS media queries (@media screen and (max-width: 768px)Use) to control which Logo is displayed at a specific screen size and which is hidden.
  2. Custom parameterIn the AnQiCMS backend "Global Function Settings", you can add custom parameters, such as creating a namedMobileLogoThe parameter is used to upload the mobile logo. Then in the template.

Related articles

How to use Sitemap and Robots.txt to improve the display effect of content in search engines?

In the world of digital marketing, it is crucial to ensure that your website content is discovered by search engines and displayed well.Sitemap (site map) and Robots.txt files are two important tools for communication between websites and search engines.They are like navigation maps and behavioral guidelines prepared for search engine crawlers. Reasonably utilizing them can significantly improve the performance of your AnQiCMS website in search results.What is a Sitemap?

2025-11-07

How can AnQi CMS improve the visibility of a website in search engines through advanced SEO tools?

In today's highly competitive online environment, whether a website can stand out in search engines is directly related to the dissemination effect and commercial value of its content.Search engine optimization (SEO) is no longer just a cherry on top, but the cornerstone of website operation.It is crucial for many small and medium-sized enterprises and content operation teams to choose a content management system (CMS) that deeply supports SEO.

2025-11-07

How can static URLs and 301 redirects optimize the display URL structure of website content?

The importance of URL structure in website operation is self-evident.A clear and friendly URL can not only enhance the user experience, but is also an indispensable part of Search Engine Optimization (SEO).A long dynamic parameter URL, for example `www.example.com/article.php?id=123&category=news, it is hard to remember and not conducive to search engines understanding the page content.

2025-11-07

How to ensure that the website correctly switches and displays content in a multilingual environment?

Expand the global market, a multilingual website is indispensable.It can help you reach users from different cultural backgrounds and language habits directly.In AnQiCMS (AnQiCMS), ensure that the website switches and displays content correctly in a multilingual environment, mainly relying on its powerful multi-site management and flexible template mechanism. Next, we will explore how to achieve this goal in Anqin CMS, allowing your website to display smoothly on the global stage.

2025-11-07

How to call and format the display of the website filing number and copyright information in AnQi CMS templates?

During the operation of the website, the filing number and copyright information are indispensable elements, which not only concern the legality of the website but also reflect the professionalism of the website.For websites built using Anqi CMS, it is a very basic but important skill to flexibly call and format these information in the template.Luckyly, AnQi CMS provides a simple and powerful template tag system, making it extremely easy to call the website filing number and copyright information.Next, let's see how to achieve this goal in Anqi CMS templates.

2025-11-07

How to retrieve and display the contact, phone number, address, and other information configured in the background?

It is crucial to clearly display a company's contact information in website operations to establish customer trust and promote communication.Whether it is the contact name, phone number, office address, or social media account, this information needs to be easily accessible to users in a prominent position on the website.The AnQi CMS provides a convenient solution, allowing you to manage and display these key information flexibly without writing complex code. ### Configure your contact information in the background The Anqi CMS backend is designed to make it easy for you to manage your website content, including your contact information.

2025-11-07

How to customize contact information parameters in AnqiCMS and call them to display in the template?

It is crucial to maintain smooth communication with users in website operation.In addition to traditional contact methods such as phone and email, we often need to display more personalized social media or instant messaging information.AnqiCMS provides a very flexible contact information management module that allows you to easily customize and flexibly display this information at any location on the website.Next, we will divide it into two main steps to explain in detail how to customize contact information parameters in AnqiCMS and call them to display in the template.### One, in AnqiCMS

2025-11-07

How to dynamically display Title, Keywords, and Description on the homepage to optimize SEO?

It is the first step in building a successful website to make it search engine friendly.And Title (title), Keywords (keywords), and Description (description) - usually abbreviated as TDK - are the core elements of a website's dialogue with search engines.They not only tell search engines about the content of your page, but also directly affect whether users click on your website in the search results.AnQi CMS knows this, and therefore built-in powerful TDK management features, allowing you to easily achieve the dynamic display and optimization of TDK.

2025-11-07