As a website operator who is deeply 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 core metadata of a web page, and its setting is particularly crucial.{% tdk %}Tags 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 connection between elements in the page title (Title) to optimize the display effect of the website.

Know{% tdk %}tags

{% tdk %}Labels are the core tools used in the AnQiCMS template system to output page SEO metadata in English.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 based on page content.{% tdk %}Tags, are the first step to ensure that website content is correctly indexed by search engines and attract user clicks. Through this tag, we can present important elements such as<title>/<meta name="keywords">and<meta name="description">等重要元素呈现在前端页面中。

Deep understandingsepParameters

When managing the page title,{% tdk %}tag provides a name ofsepthe parameter is specifically used to define the connector between different parts of the page title. When we use{% tdk %}specified in the tagname="Title"to get 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-Establish a connection. For example, if the page title is "About Us" and the website name is "AnQi CMS", and the tag is enabled in the labelsiteName=true, then the default output is<title>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_|, a vertical line.|even a space». At this point,septhe parameter 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 match the brand style of the website or the readability requirements under specific contexts.

Here are several kindssepThe usage example of parameters, which shows how to adjust the connector of the page title:

  • Using the default connector (not specifiedsep参数):

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

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

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

sepActual application and suggestions for parameters

Reasonable choicesepThe hyphen is not only about the visual neatness 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, a clear and consistent title structure is helpful to improve user experience and indirectly affect the click-through rate.

In practical application, 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 websites or portals may prefer|. Regardless of the choice, it should ensure the consistency of the site title connector to avoid confusion. In addition, when usingsep, pay attention to whether thesiteName=trueparameter has been enabled,showParent=trueParameter (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 connection function will not be reflected.

Summary

{% tdk %}TagssepParameters may seem trivial, but they are an important tool provided by AnQiCMS for website operators to perform fine-grained SEO management and brand display.By flexibly adjusting the connection symbols between title elements, we can create page titles that are more in line with the brand character and more attractive to users, adding strength to the overall performance of the website.


Common Questions and Answers (FAQ)

  1. Q:sepwhether the parameter is correctKeywordsandDescriptionis also effective?A: No,septhe parameter only applies toname="Title"English, used to connect different parts of the title, such as page title and website name.KeywordsandDescriptionIt is usually an independent content string and does not require internal connector adjustment.

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

  3. Q: In what situationssepThe parameter may not take effect?A:sepThe parameter is mainly used to connect the page title with the website name (viasiteName=trueenabling) or the parent category title (viashowParent=trueenabling). If{% tdk with name="Title" %}If the tags do not enable these parameters at the same time, or if the page title itself only consists of one part (for example, only output the page title itself without concatenating other information), thensepThe parameter may not reflect its connecting effect.