As an experienced website operations expert, I know 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.A well-constructed page title that not only attracts user clicks but also effectively improves search engine rankings.In AnQiCMS (AnQiCMS) such an efficient and customizable content management system, dynamically calling the website name suffix in the page Title tag is the core strategy for achieving brand consistency and SEO optimization.

The meaning of the site name suffix and the intelligent TDK of AnQi CMS

During the operation of a website, we often hope that the title of each page 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, but also ensures that users always feel the presence of the brand when browsing multiple pages, and it also helps search engines better understand the website structure, improving the overall SEO effect.It is not a long-term solution to manually add suffixes to each page, it takes time and is prone to errors.

AnQi CMS deeply understands this, and its 'Intelligent TDK (Title, Description, Keywords)' mechanism provides an elegant solution for it.The system has designed a clear TDK inheritance and coverage logic: first is the TDK of the content itself (such as articles, categories, single-page SEO titles, keywords, and descriptions), followed by the global TDK of the homepage, and finally the website name at the system level.This hierarchical relationship ensures the specificity of content while also allowing us to carry out unified brand management at the global level.Therefore, dynamically calling the website name suffix in the page Title tag, the essence lies in making the website name a permanent brand identifier, cleverly integrated into the Title of each page.

Backend settings: Define your site name suffix

To dynamically add the website name suffix in the page Title of AnQi CMS, we first need to clarify what 'Your website name' is in the background.This is the source of all page title suffixes.

This key setting is located in the Anqi CMS backend management interface. You just need to easily navigate to“Background Settings”and then clickGlobal function settings. Here, you will see a name called“Website Name”Configuration item. Please fill in your brand name or website name here, for example, "AnQi CMS Official Website", This “website name” will be the default suffix content for all your page titles.

In addition to "Website Name", you may also notice other global settings such as "Website Address", "Mobile End Address", etc., which together constitute the basic operating environment of the website.But for the title suffix we are discussing today, the "website name" is the core.

Front-end template: Flexible invocation and suffix customization

After completing the background settings, the next step is how to dynamically introduce this "website name" into the page Title in the front-end template.The Anqi CMS adopts a powerful syntax similar to the Django template engine, making this process intuitive and flexible.The core 'Universal TDK tag'——tdkWill help us achieve this goal effortlessly.

In your website template's<head>area, the Title tag is usually set like this:

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

This simple tag will intelligently capture 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" during the article editing, thentdk with name="Title"It will directly display the SEO title of the article. If not set, it may trace back to the article title, category title, or even the home page title.

Now, let's introduce the website name suffix.tdkThe tag provides a very practical parameter:siteName. When you are going tositeNameis set totrueAt that time, Anqicms will automatically append the website name configured in the background "Global Function Settings" to the end of the current page Title.

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

This way, no matter which page the user visits, as long as this page uses the above Title tag, its Title will automatically become "Page Title - Your Website Name" (the default separator is a hyphen-)

If you are not satisfied with the default hyphen separator,tdkthe tags also providesepa parameter allows you to customize the separator. For example, if you want to use a vertical line|as a separator:

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

At this time, the page Title will display as "Page Title | Your website name".

Moreover, if you wish to display the parent category title of Title on certain specific pages, such as the category list page or the article detail page,tdkLabels also providedshowParent=trueThe option. Combining the website name suffix, the level of the Title will be more rich:

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

This label may generate a Title structure similar to "Parent Category Title - Page Title - Your Website Name", the specific effect depends on the page hierarchy and content settings.

Tip:In practice, in order to maintain the consistency of the entire website's Title structure, we usually include the followingsiteName=true(or配合sep/showParentThe Title tag, placed in the common header file of your template (for examplepartial/header.htmlorbase.html)的<head>Region. In this way, all pages that inherit or contain this common header can automatically enjoy the convenience and consistency brought by the dynamic title suffix.

Deep understanding and practical suggestions

  • A unified strategy, flexible adjustment:Although the global settings provide a unified Title suffix, but Anqi CMS also provides the "SEO Title" field in the document, category, and single-page editing interface. When you set an "SEO Title" for a specific content,tdk with name="Title"The tag will prioritize calling this content's unique SEO title, then appending the website name suffix (ifsiteName=trueThis mechanism allows you to optimize the Title of important pages 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 that the final title length is moderate, the keywords are naturally integrated, and it is attractive to users.A long title may be truncated in search results, and a title lacking in descriptiveness may reduce click-through rate.
  • Title suffix under multi-site management:If you use the powerful multi-site management feature of Anqi CMS to operate multiple websites, each site can be configured with a different "site name" in its independent "global feature settings".tdkThe tag intelligently identifies the current visited site and calls the "site name" of the corresponding site as a suffix, without the need for additional complex configuration, greatly simplifying the management of the Title of multiple sites.

Summary

The AnQi CMS provides an efficient and intelligent page Title dynamic calling mechanism through its flexible template tags and complete backend settings. It utilizestdklabel'ssiteNameandsepParameters, website operators can easily add a brand name 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 value.


Frequently Asked Questions (FAQ)

  1. Why did I set in the template{% tdk with name="Title" siteName=true %}but the website name suffix did not display in the page Title?

    • Answer:Please first check the Anqi CMS backend.“Background Settings” -> “Global Feature Settings”,“Website Name”The field has been filled. If this is empty, the system will not be able to retrieve the suffix content. Secondly, confirm that your template file has been loaded correctly andtdkThe label is not unexpectedly overridden by other settings or code.
  2. 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, allows you to freely define the separator. You just need to change the Title tag in the template to: {% tdk with name="Title" siteName=true sep=" | " %}. You can usesepSet any string you want as a separator in the parameters.
  3. How can I make the title of a specific page not include the website name 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 the main title of the page. If you do not want to add the website name suffix, you can specify the template file for the specific page in the template (such asarchive/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 it. However, the most direct method is to ensure that the template file used by the pagetdktag does notsiteName=trueparameter, or set it explicitlysiteName=false.