How to control whether the website name suffix is displayed in the homepage title TDK tag?

Calendar 👁️ 76

If you are using AnQiCMS to build or manage your website, you may encounter a common and important issue: how to finely control the home page of the website<title>In the tag, whether to display the website name as a suffix. This not only relates to the display effect of the website in search engine results, but also directly affects the user's recognition of the brand.AnQi CMS as a content management system that emphasizes SEO optimization and flexibility, provides simple and powerful control capabilities in this aspect.

First, let's clarify what is meant by the 'website name suffix' mentioned here.In the AnQiCMS backend, you can find a configuration item named "Website Name" under "Global Function Settings" in the "Backend Settings".The name you enter here, such as "Anqi CMS", may appear as a suffix at the end of the title of your website page by default.For example, if the title of your homepage is set to 'Leading Enterprise-level CMS Solution', then what is actually displayed in the browser tab or search engine results may be 'Leading Enterprise-level CMS Solution - Anqi CMS'.

How do we control whether the 'AnqiCMS' suffix is displayed in the home page title?

AnqiCMS providestdkThis powerful template tag is used specifically to manage the page title (Title), keywords (Keywords), and description (Description) information. For the home page title, we mainly configuretdklabel'ssiteNameProperties to achieve this control.

Generally, the homepage template of your website (such asindex.htmlorbash.htmlin the file<head>Part) will contain similar code to generate page titles:

<title>{% tdk with name="Title" %}</title>

When you use it like this, if not specified explicitlysiteNameProperty,tdkThe label defaults when outputting the homepage titlewon'tAutomatically add the website name you configured in the "Global Feature Settings" as a suffix.That is to say, it will output the title of the homepage as you fill it in in the "Homepage TDK Settings" backend.For example, if you fill in "Anqi CMS official website" in the "Home TDK settings", then<title>The content of the label is 'Anqi CMS official website.'

If you want the title on the homepage to beDisplayWebsite name suffix, for example, to make “AnQi CMS Official Website” become “AnQi CMS Official Website - AnQi CMS”, you just need to intdkput in the tag.siteNameset the attribute totrueand it is done:

<title>{% tdk with name="Title" siteName=true %}</title>

Such, the label will intelligently append the website name you configured in the "Global Feature Settings" as a suffix to the title of your homepage.

Conversely, if you explicitly do not want to display the website name suffix, even if you are worried that it may be mistakenly added in some cases, you can explicitlysiteNameset the attribute tofalse:

<title>{% tdk with name="Title" siteName=false %}</title>

Although when not setsiteNamethe default is when the attribute is setfalsethe effect, but this explicit setting can make the intent of your template code clearer.

In addition, if you feel that the default delimiter (usually)-)Does not match your brand style, Anqi CMS also allows you to customize the delimiter. You cantdkthe tag withsepuse the attribute to specify, for example, if you want to use|as a separator:

<title>{% tdk with name="Title" siteName=true sep=" | " %}</title>

This will display the home page title as "AnQi CMS Official Website | AnQi CMS".

In general, AnQiCMS offers great flexibility, allowing you to easily control the composition of the homepage title according to your website's SEO strategy and brand display needs. By adjusting the template intdklabel'ssiteNameandsepAttribute, you can fully master the display method of the home page title.


Frequently Asked Questions (FAQ)

Q1: I have already filled in the homepage title in the "Homepage TDK settings" in the background, why is the website name still following when it is displayed on the front-end page?

A1: This is likely because your template file is calling the home page title,tdkthe tag is setsiteName=true. Please check yourindex.htmlorbash.htmletc. Find the home page template file,<title>in the label{% tdk with name="Title" ... %}confirm the part,siteNamewhether the attribute is set totrueIf you do not want to display the website name suffix, you can delete itsiteName=trueOr change it tositeName=false.

Q2: Does this control only apply to the homepage? How do you control the title suffix on article pages or category pages?

A2:siteNameThe attribute is intdkThe tag is universally effective. For article pages or category pages, if you have separately set the 'SEO title' on the edit page of an article or category, then this title will be displayed first.But if you still want to add the website name suffix at the end of these page titles, you can do so in the corresponding template (such asarchive/detail.htmlorcategory/list.html)的<title>Tags, the same usage{% tdk with name="Title" siteName=true %}to achieve.

Q3: I modified the template file, but the front page did not take effect immediately. What's the matter?

A3: The AnQiCMS default will use caching to improve website access speed.After you modify the template file, you may need to manually clear the cache to see the latest changes.You can log in to the backend management system, find the "Update Cache" feature (usually at the bottom of the left menu or in System Settings), and click to update the cache.In addition, browsers may also cache pages, it is recommended to try refreshing the page forcibly (Ctrl+F5 or Cmd+Shift+R), or clear the browser cache and view it again.

Related articles

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

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 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 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 create and manage a website navigation menu and implement the display of secondary navigation?

The website's navigation menu, like the skeleton and landmark of the website, guides visitors to quickly find the information they need, and is the core of user experience and website information architecture.A clear and intuitive navigation system not only enhances user satisfaction, but is also crucial for search engine optimization (SEO).AnQiCMS was designed with this in mind from the outset, providing a flexible and easy-to-operate navigation menu management function, allowing website operators to easily build and maintain the navigation system of the website.

2025-11-07

How to judge the current link status in the navigation list tags and add a highlight style?

In website operation, clear navigation is a key factor in improving user experience.When users can intuitively see their location on the current page, it not only reduces the sense of being lost but also improves the professionalism and usability of the website.Adding a highlight style to the current link in the navigation bar is a very effective way to achieve this goal.In Anqi CMS, highlighting the current link of the navigation item is actually simpler and more direct than you imagine.

2025-11-07

How to dynamically display the list of articles or products under a category in the navigation dropdown menu?

AnQi CMS: Build dynamic dropdown navigation menus to make content easily accessible In website operation, the navigation menu is the starting point for users to explore website content, and it is also an important clue for search engines to understand the website structure.The traditional navigation menu is often fixed links, when the website content becomes increasingly rich, especially when there are many articles and product types, manually maintaining the content list in the dropdown menu becomes particularly繁琐 and prone to errors.The AnQi CMS provides us with an elegant and efficient solution with its powerful content management capabilities

2025-11-07

How to manage and display all documents in AnqiCMS and support filtering by title, model, and category?

In the era of explosive digital content, efficiently managing and displaying website documents is a core challenge for every operator.When you have a vast amount of articles, product descriptions, service instructions, or any form of site content, how to ensure that these contents are organized, easy to find, and can be filtered according to different needs, is directly related to user experience and operational efficiency.AnqiCMS, as a system specially designed for enterprise content management, provides a powerful and flexible solution in this aspect.

2025-11-07