How to adjust the `sep` parameter of the `{% tdk %}` tag to change the connection symbol between TDK elements?

Calendar 👁️ 57

As an experienced website operator familiar with AnQiCMS, we know that every detail of the website can affect its performance in search engines and the user experience.Among them, TDK (Title, Description, Keywords) is the most critical metadata of the web page, and its setting is particularly important.In AnQiCMS,{% tdk %}Labels provide a convenient way to manage these important SEO elements. This article will focus on one practical parameter of this tag-sepExplore how to flexibly adjust the connecting characters between elements in the page title (Title) to optimize the display effect of the website.

Get to know{% tdk %}Tag

{% tdk %}The tag is the core tool used in the AnQiCMS template system to output page SEO metadata.It can dynamically retrieve the title (Title), keywords (Keywords), and description (Description) information of the current page.This information may come from global settings, category settings, independent settings on the article detail page, or be automatically generated by the system.Use accurately and effectively{% tdk %}The tag is the first step to ensure that the website content is correctly indexed by search engines and attracts users to click. Through this tag, we can display important elements on the front page of the page.<title>/<meta name="keywords">and<meta name="description">and other elements on the front page.

Deep understandingsepParameter

When managing the page title,{% tdk %}the label provides a namedsepthe parameter is specifically used to define the connector between different components of the page title. When we{% tdk %}the tagname="Title"use it to obtain the page title, thissepThe parameter can take effect.

By default, AnQiCMS will combine the various parts of the page title (such as, the page itself title and the website name) with a half-width hyphen.-Perform connection. For example, if the page title is "About Us", the website name is "AnQi CMS", and the tag is enabled insiteName=truethen the default output is<title>The label content may be "About Us - AnQi CMS".

However, under certain design or brand requirements, we may need to use different connectors, such as underscores._、vertical line|Even a space-containing». At this point,sepparameter comes into play. By explicitly specifying in the tagsepThe value, we can easily override the default connector. It allows us to customize these connectors to better fit the brand style of the website or the readability requirements of specific contexts.

Here are severalsepExamples of parameter usage, showing how to adjust the page title separator:

  • Using the default separator (nosepparameter):

    <title>{% tdk with name="Title" siteName=true %}</title>
    {# 假设页面标题为 "产品详情",网站名称为 "我的品牌",输出可能是:产品详情 - 我的品牌 #}
    
  • Specify a custom separator as an underscore_:

    <title>{% tdk with name="Title" siteName=true sep="_" %}</title>
    {# 输出可能是:产品详情_我的品牌 #}
    
  • Specify the custom delimiter as a vertical line|(Note the spaces to enhance readability):

    <title>{% tdk with name="Title" siteName=true sep=" | " %}</title>
    {# 输出可能是:产品详情 | 我的品牌 #}
    

sepActual application and suggestions for parameters

Reasonable choicesepThe connector not only concerns the visual cleanliness of the page, but may also affect the user's perception of the readability of the title.Although search engines usually ignore the specific style of hyphens themselves, a clear and consistent title structure helps improve user experience and indirectly affects click-through rate.

In practice, it is recommended to choose a connector based on brand image and industry habits. For example, many technology websites tend to use-or_, while news or portal websites may prefer|. Regardless of the choice, you should ensure the consistency of the full site title connector to avoid confusion. In addition, when usingsep, pay attention to whether the function has been enabledsiteName=trueparameters, as well asshowParent=trueParameters (used to display the parent category title), becausesepMainly used to connect the page title with the website name or parent element. If these components do not exist,sepThe connecting function will not be reflected.

Summary

{% tdk %}label'ssepThe parameters may seem trivial, but they are an important tool provided by AnQiCMS for website operators to carry out fine-grained SEO management and brand display.By flexibly adjusting the connecting symbols between title elements, we can create page titles that are more in line with the brand's character and more attractive to users, thereby enhancing the overall performance of the website.


Frequently Asked Questions (FAQ)

  1. Q:sepIs the parameter correct?KeywordsandDescriptionIs it also valid?A: No,sepThe parameter only applies toname="Title"It is valid, used to connect different parts of the title, such as the page title and the website name.KeywordsandDescriptionIt is usually an independent content string and does not require internal connector adjustments.

  2. Q: If not setsepParameter, what is the default connector?A: If not specifiedsepParameter, AnQiCMS system uses a half-width hyphen by default-as a connector between the elements of the page title.

  3. Q: In what situation?sepThe parameter may not take effect?A:sepThe parameter is mainly used to connect the page title with the website name (throughsiteName=trueEnable) or parent category title (viashowParent=trueEnable). If{% tdk with name="Title" %}The tags do not enable these parameters simultaneously, or the page title itself is only one component (for example, only output the page title itself without concatenating other information), thensepThe parameter may not reflect its connecting function.

Related articles

How to specify the `siteName` parameter when retrieving Title using the `{% tdk %}` tag?

As a senior website operations manager of AnQi CMS, I know that every detail of the website may affect user experience and search engine performance.During content creation and publication, the TDK (Title, Description, Keywords) of the page is the foundation of SEO optimization.Today, let's delve into the specific usage and importance of the `{% tdk %}` tag in obtaining page titles in AnQi CMS and the `siteName` parameter.

2025-11-06

How to use the `{% tdk %}` tag in AnQiCMS template to call the home page TDK information?

In the AnQiCMS content management system, the management of TDK (Title, Description, Keywords) information for website SEO is a crucial link.AnQi CMS provides convenient and powerful template tags for website operators, allowing flexible calls to this information on the front-end page.Among them, the `{{ tdk }}` tag is a universal tag specifically used to handle page TDK information.

2025-11-06

How to customize the separator between the website name and the main title in the AnQiCMS homepage title?

As a senior AnQiCMS website operations manager, I fully understand the key role of the homepage title in search engine optimization (SEO) and user experience.A clear and easily recognizable title can effectively convey the core theme of the website and help users quickly understand the content of the webpage, thereby improving click-through rates and retention.AnQiCMS as a flexible content management system provides rich features to meet our refined control requirements for content display, including the customization of the separator between the website name and the main title in the homepage title.###

2025-11-06

Does AnQiCMS support automatically adding the website name after the homepage title? How to enable or disable it?

As a senior security CMS website operation personnel, I fully understand the importance of reasonably integrating the website name into the title for SEO optimization and brand recognition.AnQiCMS is a system focused on efficient content management and naturally provides a flexible way to handle this common requirement. --- ### Does AnQiCMS support automatically adding the website name after the homepage title?How to turn on or off?

2025-11-06

How to get the Keywords or Description of the homepage separately by using the `{{ tdk }}` tag?

As a senior personnel deeply involved in the operation of AnQiCMS (AnQiCMS) website, I am well aware of the importance of TDK (Title, Description, Keywords) for website search engine optimization (SEO), especially for the 'face' of the website - the homepage. The precise setting and effective invocation of TDK is of paramount importance. AnQiCMS provides a powerful and flexible template tag system, among which the `{% tdk %}` tag is a powerful tool for managing page meta-information.

2025-11-06

What are the advantages of AnQiCMS' "Universal TDK Tag" in the home page TDK settings?

As an experienced website operator proficient in AnQiCMS and skilled in content creation, editing, publishing, and optimization, I am well aware of the crucial role that every detail plays in website SEO, especially for the 'face' of the website - the homepage. The setting of the TDK (Title, Description, Keywords) tags is of utmost importance. The 'universal TDK tag' feature provided by AnQiCMS in this field demonstrates excellent advantages in homepage settings, bringing great convenience and efficiency improvement to website operations

2025-11-06

How to set and manage TDK for other pages in AnQiCMS except for the homepage?

As an experienced CMS website operation person, I know that the setting and management of TDK (Title, Description, Keywords) on other pages of the website, except for the homepage, is crucial for improving search engine rankings and user experience.The Anqi CMS provides flexible and powerful tools to ensure that every page of the website has precise optimized TDK information.

2025-11-06

How to set an independent SEO title for a single article when publishing an article (archive)?

As an operator who has been dealing with AnQiCMS for a long time, I know the importance of content in attracting and retaining users, and I am also aware of the decisive role of search engine optimization (SEO) in content dissemination.AnQiCMS was designed with SEO needs in mind from the outset, providing many practical tools.

2025-11-06