The home page title (Title) of the website is one of the key elements of Search Engine Optimization (SEO), which not only directly affects the willingness of users to click on the website in search results, but also carries the important responsibility of conveying brand information.In AnQiCMS (AnQi Content Management System), we often encounter a problem: how to flexibly control the title of the homepage, so that it displays the core content while optionally adding or not adding the site name as a suffix?AnQiCMS provides an intuitive and efficient setup method.

Understanding the relationship between the homepage title and the suffix of the website name

In AnQiCMS design, the website name is usually configured uniformly in "Global Function Settings", which represents our brand identity.The title content of the homepage is defined separately in the "Homepage TDK Settings", aiming to highlight the core theme of the homepage.When we need to reflect the brand in the page title while maintaining the uniformity of the title specifications, the requirement arises to append the suffix "Website Name" after the "Home Page Title".

For example, if your website name is “AnQi CMS” and you want to set the homepage title to “Enterprise-level Content Management System Solution”, then you may expect to see “Enterprise-level Content Management System Solution - AnQi CMS” in the browser title bar or search engine results.And sometimes, you may prefer to keep the title concise, showing only 'Enterprise-level Content Management System Solution'.AnQiCMS allows us to precisely control this display behavior.

The core method for controlling the homepage title suffix in AnQiCMS

AnQiCMS handles the page title generation logic through specific tags in the template files, which makes the title display highly flexible. Specifically, the key to whether the site name suffix is appended to the homepage title lies in the use of{% tdk %}TagssiteNameproperties.

  1. No website suffix attached (default behavior): ThissiteNameDefault setting of the property, equivalent to explicitly setting itsiteName=falseThis means that if you call the home page title in the template file, you can simply use the following tag:

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

    or

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

    Then, the browser will only display the title content you fill in the "Home Page TDK Settings" in the background, and will not automatically append the website name afterwards.

  2. Append website name suffix: If you want to add the website name as a suffix at the end of the home page title, you need to setsiteNameproperty is set totrue。Find the location in your template file that is responsible for outputting the home page title (usually in<head>Within the area), and modify it to:

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

    Through this setting, when your homepage title is "Enterprise-level Content Management System Solution" and the website name is "AnQi CMS", the final page title will be displayed as "Enterprise-level Content Management System Solution - AnQi CMS" (default separator is "-").

  3. Custom delimiter: Except for controlling whether to append the website name, AnQiCMS also allows you to customize the separator between the title and the website name.tdkTags provide asepThe property is used for this purpose. For example, if you want to use the underscore "_" as a separator, you can set it like this:

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

    So, the title will display as “Enterprise-level Content Management System Solution_AncmsCMS”.

Actual operation process

To implement flexible control of the suffix after the home page title, you need to follow several steps:

  1. Set the website name: First, log in to the AnQiCMS backend, navigate to 'Backend Settings' -> 'Global Function Settings'.Here, make sure that the "Website Name" field is correctly filled in with your brand or site name.This name will be the source of the suffix.

  2. Set the home page title content: Next, go to 'Background Settings' -> 'Home Page TDK Settings'. Enter the core title text you want to display on the home page in the 'Home Page Title' field.

  3. Adjust the title tag in the template file: This is the most critical step. You need to access the template file you are currently using. Usually, the output logic for the home page title is located in the template file.<head>区域内。找到类似[English]<title>...</title>的标签,并在其中找到调用[English]tdk标签的部分。 根据您的具体需求:[English]

    • 如果不想附加网站名称后缀,请确保标签是[English]{% tdk with name="Title" %}or{% tdk with name="Title" siteName=false %}.
    • If you want to add a website name suffix, please change the tag to{% tdk with name="Title" siteName=true %}.
    • If you want to add a custom separator while adding a suffix, you can addsepattributes, for example{% tdk with name="Title" siteName=true sep=" | " %}.

After making these adjustments, save your template file and clear the system cache (if necessary), refresh the homepage to see the effect.

Application scenarios and suggestions

Is it necessary to add a website name suffix after the home page title, which is a decision that website operators need to weigh based on their SEO strategy and brand image.

  • When to add a suffix:For new brands that hope to increase brand exposure through the title, or for websites that need to ensure that the title stands out among numerous search results, adding a website name suffix is a good choice.It helps strengthen brand recognition and makes the title structure of each page more unified.
  • When not to add a suffixIf the brand awareness of the website is already very high, or the core keywords themselves contain the brand name, or if you want the title to be as concise as possible to highlight the core content within the limited number of characters, then not adding a website name suffix may be more appropriate.

This refined control capability provided by AnQiCMS allows us to flexibly adjust the display strategy of the homepage title according to different stages of website development and specific marketing objectives, thus better serving the overall operation of the website.


Common Questions (FAQ)

1. I have already set it in the templatesiteName=true, why is the homepage title still without the website name suffix?

Please check two aspects: first, confirm that you have correctly filled in and saved the "Website Name" in the "Background Settings" -u003e "Global Function Settings" on the AnQiCMS background; second, make sure you are modifying the template file currently in use by the website, and after modifying the template file, you may need to clear the system cache for it to take effect.

2. Besides the homepage, can you control whether the title of other pages such as article detail pages and category pages is appended with the website name suffix?

siteNameThe property istdkThe tag in the page title acquisition (name="Title"When auto configuration is selected. Therefore, theoretically you can adjust the title call in any page template file.tdkTagssiteNameProperty to control whether to append the website name suffix. For example, find in the template of the article detail page.<title>similar in the tag{% tdk with name="Title" %}call, and add as needed.siteName=true