As an experienced CMS website operation person in the security industry, I fully understand the importance of integrating the website name reasonably in the website title for SEO optimization and brand recognition.AnQiCMS as a system focused on efficient content management naturally also provides a flexible way to handle this common need.
Does AnQiCMS support automatically adding the website name after the homepage title? How to enable or disable it?
In website operations, the page title (meta title) is one of the key elements of Search Engine Optimization (SEO).A common practice is to automatically add the brand name of the website after the title of a specific page, which not only helps to enhance brand awareness but also provides stronger recognition in search results.AnQi CMS fully considers this requirement and provides an intuitive and flexible configuration method to combine the page title with the website name.
Title management mechanism in AnQiCMS
AnQiCMS has adopted a hierarchical design in title management, ensuring the flexibility of content and the convenience of global control.First, it allows you to define the overall name of the website in the background global settings.Secondly, through template tags, developers and operations personnel can accurately control whether and how the global website name is appended to the titles of each page.This mechanism means that you can flexibly decide whether to display the website name suffix for different types of pages such as the homepage, article page, category page, etc., and customize its display method.
Configure the website name: source of the website name
To add the website name after the homepage title, you first need to define your "website name" in the AnQiCMS backend settings.This name will be used as a suffix for all possible page titles.
You can navigate to the 'Global Settings' option under the 'Backend Settings' in the backend management interface.Here, you will find an input box named "website name".Please enter the brand name you want to display after the page title, for example, "AnQi CMS official website".After completing the filling, save the settings, the global website name is ready and waiting to be called in the template.
Control the addition of title suffix in the template (enable or disable)
Control whether the website name is automatically added after the page title, mainly through modifying the specific tags in the website template file. AnQiCMS usestdktags to unify the management of the page'stitle/keywordsanddescription. When setting the page title,tdkthe label provides a namedsiteNamethe parameter is used to precisely control the display of the website name.
To enable this feature, you need to modify the website template file (usually)base.htmlor the component responsible for generating the pageheadIn the common template), find the definition<title>The position of the tag. For example, if your template uses the following code to define the page title:
<title>{% tdk with name="Title" %}</title>
By default,siteNameparameters forfalseThis means that even if you set the global website name, it will not be automatically appended to the title. To enable the function of automatically appending the website name to the page title, you need to setsiteNameThe parameter is explicitly set totrue:
<title>{% tdk with name="Title" siteName=true %}</title>
By making this simple modification, AnQiCMS will automatically retrieve the 'Website Name' you have configured in the global settings and append it as a suffix to the title of the current page.
If you want to disable this feature, so that the website name does not appear as a suffix in the title, there are several methods that can be implemented:
- Explicitly disable:to
siteNamethe parameter tofalseFor example:<title>{% tdk with name="Title" siteName=false %}</title>. - Remove parameter:Remove directly
siteNameThe parameter, as its default value isfalseYou can omit the parameter to achieve the shutdown effect:<title>{% tdk with name="Title" %}</title>.
This template-level control method grants website operators great flexibility, allowing precise adjustments to the display behavior of titles for different page types or design requirements.
Custom separator between title and website name
In addition to controlling whether to display the website name suffix, AnQiCMS also allows you to customize the separator between the page title and the website name. This is also throughtdka parameter of the tagsepImplemented. By default, AnQiCMS uses a hyphen-as a separator. If you want to use other symbols, such as an underscore_or a vertical line|, you cantdkthe tag throughsepSet the parameter:
<title>{% tdk with name="Title" siteName=true sep="_" %}</title>
The above code will concatenate the page title with the website name using an underscore_This parameter also needs to be modified in the template file.
Summary
AnQiCMS via the backend global website name setting and in the front-end templatetdktags and theirsiteNameandsepParameters provide powerful and flexible control over website title management.This allows website operators to easily implement personalized customization of homepage and even the entire site page titles, ensuring brand consistency and recognition in search engine results, while also considering the practice of SEO.
Frequently Asked Questions (FAQ)
1. Can I set an independent title for a specific article or category page without using the global website name suffix?
Of course, you can.AnQiCMS allows you to set a 'SEO title' separately when publishing articles or creating categories.When you fill in these custom SEO titles, the system will prioritize using the titles of these specific pages instead of automatically generating them from the content title.tdkWhen labeling, if you do not want the website name suffix to be added, you can do so in the corresponding template'stdkput in the tag.siteNamethe parameter tofalseOr directly include the full title (including the brand name you want) in the SEO title, thensiteNameis set tofalseSo the system will not add duplicates.
2. How do I stop adding the website name after the title of any page?
If you want to completely disable the website name as a suffix feature, you need to edit your website template file. Find all uses{% tdk with name="Title" ... %}of the place to generate page titles, and replacesiteNameThe parameter is explicitly set tofalseFor example:<title>{% tdk with name="Title" siteName=false %}</title>If you do this on all pages, the website name will not appear as a suffix in the title of any page.
3.tdkin the labelsiteNameWhat is the default parameter value?
According to the document,tdkin the labelsiteNameThe default parameter value isfalseThis means that if you only use{% tdk with name="Title" %}without explicitly specifyingsiteNamethe website name will not be added automatically as a suffix. You must set it totrueto enable this feature.