As an experienced AnQiCMS website operator, I know the crucial role of the homepage title in search engine optimization (SEO) and user experience.A clear and easily identifiable title can effectively convey the core theme of the website and help users quickly understand the content of the web page, thereby improving click-through rate and retention.AnQiCMS as a flexible content management system provides rich features to meet our fine-grained control of content display, including the customization of the separator between the website name and the main title in the homepage title.

Understand the composition and delimiter of the AnQiCMS home page title

In the AnQiCMS system, the home page of the<title>The label content is usually composed of two core elements: the main title of the current page (for example, the name of the homepage of a website, a brand slogan, etc.) and the global name of the website (usually the name of the company or brand).In order to visually separate these two parts, the system will insert a character between them, which is what we call a 'separator'.By default, AnQiCMS usually adopts the-The standard separator between the main title and the website name.However, in order to better conform to the brand image, meet specific SEO strategies, or simply for visual preferences, we may need to adjust this default separator.

Custom positioning of the title delimiter

AnQiCMS through its powerful template engine, allows us to deeply customize the elements of the website.The output of the home page title, as well as control of delimiters, mainly focuses on the specific tag calls in the website template files.In particular,tdkTags are responsible for fetching and outputting page Title, Keywords, Description (TDK) information. By usingtdkAdjusting label parameters, we can customize the separator.

Detailed steps: Modify the template file to customize the separator.

We need to directly edit the website template file to customize the separator of the AnQiCMS homepage title.This process involves locating files, modifying tag parameters, and verifying effectiveness.

First, you need to log in to your server file system through FTP tools, SFTP clients, or Baota panel, etc. Navigate to the template root directory of AnQiCMS, which is usually located/templateUnder the path. Here, you will find the template folder currently being used by your website (for exampledefaultor a custom template name).

After entering the current template folder, look forbase.htmlorindex/index.htmlThese two files. In AnQiCMS, the global HTML structure and common elements (including<head>title definitions within tags) are usually included inbase.htmlthe files, whileindex/index.htmlIt may be that there is a specific title definition for the homepage. You need to open these files and look for the code lines used to generate the title in the file.<head>area. This code usually containstdkThe label may be in the form of:

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

This code dynamically generates the page title, wherename="Title"Specified to retrieve the title information,siteName=trueThis indicates that the global name of the website is appended to the main title. To customize the separator between these two parts, we can introduce a parameter namedtdkin thesep.sepYou can specify any character or string as a new delimiter.

For example, if you want to replace the default hyphen “-” with a vertical bar “|Please separate the delimiter with spaces to enhance readability, you can modify the above code to:

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

If you prefer to use double colons “::as a separator, then you can modify it like this:

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

Even if you have special requirements not to have any separator between the main title and the website name, you can change it tosepThe parameter is set to an empty string:

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

After modifying the template file, please make sure to save the changes. Since AnQiCMS uses a caching mechanism to improve performance, you may need to log in to the AnQiCMS backend management system and perform cache clearing operations in the "Update Cache" function.After clearing the cache, refresh your website homepage, the new delimiter should take effect immediately.

In this way, you can flexibly adjust the visual presentation of the homepage title according to your brand needs and SEO optimization strategy, thereby better attracting and retaining your target users.

Frequently Asked Questions

Q1: I have modifiedbase.htmlorindex/index.htmloftdktags and set them upsepthe parameters, but the title of the homepage still hasn't changed, why is that?

A1: There may be several reasons for this situation. Firstly, the most common reason is that the system cache has not been cleared.AnQiCMS to improve loading speed, it will cache page content, therefore, after you modify the template file, you need to log in to the background management system, find the "Update Cache" function and execute it, then refresh your browser thoroughly (you may need to force refresh, such asCtrl+F5orShift+F5To ensure that the latest content is loaded. Next, please confirm that you are modifying the template file currently in use on the website, as well as whether the file has been successfully saved to the server.

Q2: Besides the homepage, will the title separator of the article detail page and the category list page be affected by this setting? How can I only modify the separator of the homepage?

A2: If you arebase.htmlModified in the global template skeleton of the websitetdklabel'ssepThen all inherited propertiesbase.htmlThe page, including article detail pages, category list pages, single pages, etc., the title separator will be affected. If you only want to modify the separator on the home page, one method is to only modify the template file unique to the home page (for exampleindex/index.htmlset in thesepparameters, or inbase.htmluse conditional judgment logic, applying different delimiter settings based on the current page type.

Q3: Can I customize the display order of the website name and main title in the title? For example, to have the website name first, followed by the main title?

A3:tdklabel'ssiteName=trueProperties usually mean that the website name is appended after the main title.The document does not directly provide a parameter to reverse the display order of these two parts.If you have this requirement, you may need to modify the template logic in more depth, or an alternative method is to manually enter your "website name" at the front of the "home page title" field in the "Home Page TDK Settings" of AnQiCMS, thentdkOmitted in the tagsiteName=trueBy manually combining the order.