As a senior AnQiCMS website operation staff, I am well aware of the crucial role of the homepage title in search engine optimization (SEO) and user experience.A clear and easily recognizable 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 functions 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.

Understanding the composition of AnQiCMS homepage title and the role of the separator

In AnQiCMS system, the customization method of the separator of the title of the home page of the<title>The content of the label is usually composed of two core elements: the main title of the current page (such as, the name of the home page of the website, brand slogan, etc.) and the global name of the website (usually the name of the company or brand).In order to visually distinguish these two parts, the system will insert a character between them, which is what we call a "separator".-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 delimiter.

position title separator

AnQiCMS through its powerful template engine, allows us to deeply customize each element of the website.The output of the home page title and the control of its separator are mainly concentrated on the specific tag calls in the website template files.tdkTags are responsible for fetching and outputting the page's Title, Keywords, and Description (TDK) information. By means oftdkThe adjustment of label parameters allows us to customize delimiters.

Detailed operation steps: Modify the template file to customize the delimiter.

To customize the separator in the AnQiCMS homepage title, we need to directly edit the website's template files.This process involves locating files, modifying tag parameters, and verifying effectiveness.

Firstly, 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/templatePath down here. You will find the template folder currently being used by your website (for exampledefaultor any custom template name).

After entering the current template folder being used, look forbase.htmlorindex/index.htmlThese two files. In AnQiCMS, the global HTML structure and common elements (including)<head>the title definition within the tag) are usually included inbase.htmlthe file, whileindex/index.htmlIt may have specific title definitions for the homepage. You need to open these files, and in the file<head>area, find the code lines used to generate the title. This code usually includestdkLabel, which may be similar to:

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

This code will dynamically generate the page title,name="Title"Specified to get the title information,siteName=trueThis indicates that the website's global name is appended to the main title. To customize the separator between these two parts, we can introduce a named in the tag.tdktag calledsep的参数。这个sepThe parameter allows you to specify any character or string as a new delimiter.

For example, if you want to replace the default hyphen “-” with a vertical bar “| auto

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

English ::As a separator, you can modify it like this:

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

Even if you have special requirements and do not want to have any separator between the main title and the website name,sepParameter is set to an empty string:

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

Complete the modification of the template file and 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 cleaning operations in the 'Update Cache' feature.Complete the cache cleaning and then refresh your website's homepage. The new delimiter should take effect immediately.

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

Frequently Asked Questions

Q1: I have modified itbase.htmlorindex/index.htmloftdkand set the tagsepbut the home page title still doesn't change, why is that?

A1: This situation may occur for several reasons.Firstly, the most common reason is that the system cache has not been cleared.Ctrl+F5orShift+F5),to ensure that the latest content is loaded. Next, please confirm that you are modifying the template file currently in use by the website, and whether the file has been successfully saved to the server.

Q2: Will the separator be affected for article detail pages and category list pages besides the homepage? How can I only modify the separator for the homepage?

A2: If you are inbase.htmlModified in the (usually the global template skeleton) of the websitetdkTagssepproperty, then all inheritedbase.htmlThe page, including article detail pages, category list pages, single pages, etc., the title separators will be affected. If you only want to modify the separator on the homepage, one method is to only modify the template file unique to the homepage (for exampleindex/index.html)in settingsepparameter, or inbase.htmlin use, conditional judgment logic is applied to set different separators according to 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 and the main title last?

A3:tdkTagssiteName=trueThe term 'attribute' usually means appending the website name to the main title.The document does not directly provide parameters to reverse the display order of these two parts.tdkOmitted in tagssiteName=trueThrough manual combination to control the order.