As a senior website operations expert, I am well aware that every detail is crucial for the visibility of the website and brand building, and the page title (Title) is undoubtedly one of the most eye-catching elements among them.A meticulously crafted page title that not only attracts user clicks but also effectively improves search engine rankings.In AnQiCMS such an efficient and customizable content management system, dynamically calling the website name suffix in the page Title tag is a core strategy for brand consistency and SEO optimization.
The meaning of 'website name suffix' and the intelligent TDK of AnQi CMS
During the operation of a website, we often hope that each page's Title can include the brand name of the website, such as 'Article Title - Your Website Name' or 'Product Name | Your Brand'.This unified naming method not only enhances brand recognition and makes users always feel the presence of the brand while browsing multiple pages, but also helps search engines better understand the website structure and improve the overall SEO effect.It is not a long-term solution to manually add suffixes to each page, as it is time-consuming and prone to errors.
AmpCMS is well-versed in this, and its 'Smart TDK (Title, Description, Keywords)' mechanism provides an elegant solution.The system has designed a clear TDK inheritance and override logic: first is the TDK of the content itself (such as articles, categories, single pages' SEO titles, keywords, and descriptions), followed by the global TDK of the homepage, and finally the website name at the system level.This hierarchy ensures content specificity while also allowing for unified brand management at a global level.Therefore, the essence of dynamically calling the website name suffix in the page Title tag lies in making the website name a permanent brand identifier, ingeniously integrated into the Title of each page.
Backend Settings: Define the suffix of your website name
To dynamically add the website name suffix to the page Title in AnQi CMS, we first need to clearly specify 'Your Website Name' in the backend.This is the origin of all page title suffixes.
This key setting is located in the admin interface of Anqi CMS. You just need to easily navigate to“Backend Settings”, and then click.“Global Function Settings”Here, you will see a name as“Website Name”Configuration item.Please make sure to fill in your brand name or website name here, such as 'AnQi CMS Official Website', '[Your Company Name] Official Website', etc.This 'website name' will serve as the default suffix content for all your page Titles.
You may also notice other global settings such as 'Website Address' and 'Mobile Address' in addition to 'Website Name', which together constitute the basic operating environment of the website.For the title suffix we are discussing today, "Website Name" is the core.
Front-end Template: Flexible calling and custom suffix
After completing the background settings, the next step is how to dynamically introduce this 'website name' into the page Title in the frontend template.The Anqi CMS adopts a powerful syntax similar to the Django template engine, making this process intuitive and flexible.tdkwill help us achieve this goal with ease.
in your website template's<head>Area, the Title tag is usually set like this:
<title>{% tdk with name="Title" %}</title>
This simple tag intelligently captures the corresponding SEO title based on the type of the current page (article details, category list, single page, etc.). For example, if the current page is an article details page and you have set the 'SEO title' while editing the article, thentdk with name="Title"The SEO title of the article will be displayed directly. If not set, it may revert to the article title, category title, or even the homepage title.
Now, let's introduce the suffix of the website name.tdkTags provide a very practical parameter:siteNameWhen you are going tositeNamesettrueWhen, the security CMS will automatically append the "site name" you configured in the "global feature settings" at the end of the current page title.
<title>{% tdk with name="Title" siteName=true %}</title>
This way, regardless of which page the user accesses, as long as this page uses the aforementioned Title tag, its Title will automatically become “Page Title - Your Website Name” (the default separator is the hyphen)-).
If you are not satisfied with the default hyphen separator,tdkthe tag also provides,sepparameters, allowing you to customize the separator. For example, if you want to use a vertical bar|as the separator:
<title>{% tdk with name="Title" siteName=true sep=" | " %}</title>
The page title will display as "Page Title | Your Website Name".
In addition, if you want the Title to display the parent category's title on certain specific pages, such as the category list page or the article detail page,tdktags also provideshowParent=true[The option.] Combining the website name suffix, the hierarchy of Title will become richer:
<title>{% tdk with name="Title" siteName=true showParent=true sep=" - " %}</title>
This tag may generate a title structure like 'Parent Category Title - Page Title - Your Website Name', the specific effect depends on the page hierarchy and content settings.
Tip:In practice, to maintain the consistency of the Title structure of the entire website, we usually will include the abovesiteName=true(or in conjunction with)'}
]sep/showParentThe Title tag, placed in your template's public header file (for examplepartial/header.htmlorbase.html) of<head>[en] The area. Thus, all pages inheriting or containing this common header can automatically enjoy the convenience and consistency brought by the dynamic title suffix.
[en] Deep understanding and practical recommendations
- Unified strategy, flexible fine-tuning:Although the global settings provide a unified Title suffix, the Anqi CMS also provides an 'SEO Title' field in the document, category, and single-page editing interfaces. When you set an 'SEO Title' for a specific content,
tdk with name="Title"The tag will prioritize this content's unique SEO title and then append the site name suffix (ifsiteName=trueThis mechanism allows you to optimize the Title of important pages specifically while maintaining global brand consistency, balancing universality and personalization. - Balancing SEO and user experience:The application of dynamic title suffixes requires a balance between SEO and user experience.Ensure the final Title length is moderate, keywords naturally integrated, and attractive to users.A long title may be truncated in search results, and a title lacking descriptive content may reduce the click-through rate.
- Title suffix under multi-site management:If you use the powerful multi-site management feature of the Anqi CMS to operate multiple websites, each site can be configured with a different "site name" in its independent "global function settings".
tdkLabels will intelligently recognize the current visited site and use the "site name" of the corresponding site as a suffix, without requiring any additional complex configuration from you, greatly simplifying the management of multiple sites' Title work.
Summary
AnQi CMS provides an efficient and intelligent dynamic page Title calling mechanism through its flexible template tags and perfect backend settings.tdkTagssiteNameandsepParameters, website operators can easily add a brand suffix to all page Titles, thus taking a solid step towards enhancing brand exposure and optimizing search engine friendliness.This clever thought of transforming technical details into practical functions is exactly what Anqi CMS, as an enterprise-level content management system, pursues in terms of value.
Common Questions (FAQ)
Why am I setting it in the template?
{% tdk with name="Title" siteName=true %}but the website name suffix does not appear in the page Title?- Answer:Please first check the Anqi CMS background's“Background Settings” -> “Global Function Settings”in,“Website Name”Field has been filled. If this is empty, the system will not be able to retrieve the suffix content. Additionally, confirm that your template file has been loaded correctly.
tdkThe label is not unexpectedly overwritten by other settings or code.
- Answer:Please first check the Anqi CMS background's“Background Settings” -> “Global Function Settings”in,“Website Name”Field has been filled. If this is empty, the system will not be able to retrieve the suffix content. Additionally, confirm that your template file has been loaded correctly.
Can I customize the separator for the website name suffix in the page Title? For example, using “|” instead of “-”?
- Answer:Of course you can.
tdkTags provide asep(separator) parameter, allowing you to freely define separators. Simply change the Title tag in the template to:{% tdk with name="Title" siteName=true sep=" | " %}You can set any string you want as a separator in thesepparameters.
- Answer:Of course you can.
How can I make the Title of a specific page not include the website suffix or use a completely different Title format?
- Answer:For a specific page (such as an article, category, or single page), you can find the 'SEO Title' field on its edit page.The title set here will be used as the main title of the page.
archive/detail.htmlAdjust the Title Tag to{% tdk with name="Title" siteName=false %}or in the background "Global Function Settings", create a "Custom Parameter" for this page and set a specific Title, then use it in the template.{% diy with name="您的自定义参数名" %}Call. However, the most direct method is to ensure that the template file used by this page does not havetdktagssiteName=trueparameters, or explicitly set tositeName=false.
- Answer:For a specific page (such as an article, category, or single page), you can find the 'SEO Title' field on its edit page.The title set here will be used as the main title of the page.