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 your website<title>In label, whether to display the website name as a suffix.This not only concerns the display effect of the website in search engine results, but also directly affects the user's perception of the brand.AnQi CMS as a content management system that focuses on SEO optimization and flexibility, provides simple and powerful control capabilities.
Firstly, let's clarify what is meant by the 'suffix of the website name' mentioned here.In AnQiCMS backend, you can find a configuration item named "Website Name" under "Global Function Settings" in "Backend Settings".The name you fill in here, such as “Anqi CMS”, may appear as a suffix at the end of your website page title by default.For example, if the title of your homepage is set to "Leading enterprise-level CMS solution
How do we control whether the "AnQi CMS" suffix is displayed in the home page title?
AnQi CMS providestdkThis powerful template tag is specifically used for managing page title (Title), keywords (Keywords), and description (Description) information. For the home page title, we mainly configuretdkTagssiteNameProperties to implement this control.
Generally, your website's homepage template (such as)index.htmlorbash.htmlin the file<head>Part) may contain similar code to generate page titles:
<title>{% tdk with name="Title" %}</title>
When used in this way, if not explicitly specifiedsiteNameattributes,tdkThe label is the default when used to output the title on the home pagewill notEnglish version: Add the site name configured in the "Global Feature Settings" as a suffix.That is to say, it will output the "Home Title" exactly as you filled it in the "Home TDK Settings" on the backend.<title>The content of the label is 'AnQi CMS Official Website'.
If you wish to have the title on the home pagedisplayWebsite name suffix, for example, to make 'AnQi CMS Official Website' become 'AnQi CMS Official Website - AnQi CMS', you just need totdkput in the tagsiteNameproperty is set totrueas follows:
<title>{% tdk with name="Title" siteName=true %}</title>
Thus, the tag will intelligently append the website name you configured in 'Global Function Settings' as a suffix to the end of your homepage title.
反之,if you explicitly do not want to display the website name suffix, even if you are worried it may be incorrectly added in some cases, you can explicitly specify.siteNameproperty is set tofalse:
<title>{% tdk with name="Title" siteName=false %}</title>
Although when no settingsiteNameis set as the defaultfalseThe effect, but this explicit setting can make your template code clearer.
In addition, if you feel that the default separator (usually)-)Does not meet your brand style, the AnQi CMS also allows you to customize the delimiter. You cantdktag.septo specify, for example, if you want to use|as the separator:
<title>{% tdk with name="Title" siteName=true sep=" | " %}</title>
So, your home page title will display as “Anqi CMS Official Website | Anqi CMS”.
In general, AnQiCMS offers great flexibility, allowing you to easily control the composition of the home page title according to the website's SEO strategy and brand display needs. By adjusting the template intdkTagssiteNameandsepIf you know the properties, you can fully master the display method of the homepage title.
Common Questions (FAQ)
Q1: I have already filled in the home page title in the "Home Page TDK Setting" on the backend, why is the website name still displayed at the end when the front-end page is displayed?
A1: This is very likely because your template file is calling the home page title,tdkThe label has been set.siteName=truePlease check yourindex.htmlorbash.htmlfind the home page template file,<title>the tag in{% tdk with name="Title" ... %}confirm thesiteNameproperty has been 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 affect the homepage? How to control the title suffix of article pages or category pages?
A2:siteNameProperties intdkThe label is universally valid.For article pages or category pages, if you have separately set the 'SEO title' on the edit page of the article or category, then this title will be displayed first.archive/detail.htmlorcategory/list.html) of<title>Label within, also use{% tdk with name="Title" siteName=true %}to achieve.
Q3: I modified the template file, but the front-end page did not take effect immediately, what's the matter?
A3: English CMS will use caching by default to improve website access speed.When you modify the template file, you may need to manually clear the cache to see the latest changes.You can log in to the background 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 to refresh the page forcibly (Ctrl+F5 or Cmd+Shift+R), or clear the browser cache and then view it.