The homepage title (Title) 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 brand information communication.In AnQiCMS (AnQi Content Management System), we often encounter a problem: how to flexibly control the title of the homepage so that it can display the core content while optionally adding or not adding the name of the website as a suffix?AnQiCMS provides an intuitive and efficient setting method for this.

Understand the relationship between the homepage title and the website name suffix

In the design of AnQiCMS, the website name is usually configured uniformly in the "Global Function Settings", which represents our brand identity.And 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 want to reflect the brand in the page title while maintaining the standardization of the title, there is a need to append the "site name" as a suffix to the "home page title".

For example, if the name of your website is "AnQi CMS" and you want the homepage title to be "Enterprise Content Management System Solution", then you may expect to see "Enterprise Content Management System Solution - AnQi CMS" in the browser title bar or search engine results.Sometimes, you may prefer to keep the title concise, displaying only "an enterprise-level content management system solution".AnQiCMS allows us to precisely control this display behavior.

The core method to control the homepage title suffix in AnQiCMS

AnQiCMS processes the generation logic of page titles through specific tags in template files, which makes the display of titles highly flexible. Specifically, the key to controlling whether the site name suffix is appended to the home page title lies in using{% tdk %}label'ssiteNameProperty.

  1. Do not add the website name suffix (default behavior): This issiteNameThe default setting of the attribute, equivalent to explicitly setting itsiteName=falseThis means that when you call the homepage title in the template file, you 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 TDK Settings" in the background, and will not automatically append the website name after it.

  2. Append website name suffix: If you want to add the website name as a suffix at the end of the homepage title, you need tositeNameset the attribute totrue. Find the position in your template file that is responsible for outputting the homepage title (usually in<head>within the area), and change it to:

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

    With this setting, when the home page title is "Enterprise-level Content Management System Solution" and the website name is "AnQi CMS", the final page title will display as "Enterprise-level Content Management System Solution - AnQi CMS" (the default separator is "-").

  3. Custom delimiter: Except for controlling whether to attach the website name, AnQiCMS also allows you to customize the separator between the title and the website name.tdkTags provide asepProperties are 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>
    

    This title will display as "Enterprise-level Content Management System Solution_AncmsCMS".

Actual operation process

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

  1. Set the website nameFirst, log in to the AnQiCMS admin panel, navigate to "Global Function Settings".Here, please 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 contentFollow the steps below: Go to "Backend Settings" -> "Home TDK Settings". Enter the core title text you want to display on the home page in the "Home Title" field.

  3. Adjust the title tag in the template file: This is the most critical step. You need to access the website template file you are currently using. Typically, the output logic of the home page title is located in the template file.<head>Within the area. Find similar<title>...</title>tags, and find the call within themtdkpart of the tag. According to your specific needs:

    • If you do not want to attach a website name suffix, make sure the tag is{% 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 addsepproperties, such as{% 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

Whether to add the website name suffix to the title on the homepage, it is a decision that website operators need to weigh based on their SEO strategy and brand image.

  • When to add the suffix: For new brands, those hoping to increase brand exposure through headlines, or websites in need of ensuring that their titles stand out among search results, adding a website name suffix is a good choice.It helps strengthen brand awareness and make the title structure of each page more unified.
  • When not to add the suffixIf the website's brand popularity is already high, or the core keywords already contain the brand name, or you want the title to be as concise as possible to highlight the core content within a limited number of characters, then it may be more appropriate not to add a website name suffix.

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


Frequently Asked Questions (FAQ)

1. I have already set it in the templatesiteName=trueWhy 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" -> "Global Function Settings" of the AnQiCMS background; second, make sure you are modifying the template file currently in use by the website, and after modifying the template file, it may be necessary to clear the system cache for the changes to take effect.

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

siteNameattribute istdkTags are retrieving the page title (name="Title"The general configuration when Therefore, theoretically, you can adjust the title call in any page template file.tdklabel'ssiteNameThe attribute to control whether to append the website name suffix. For example, in the article detail page template, find<title>similar in the tag{% tdk with name="Title" %}call and add according to the needsiteName=true