How to concatenate the article title (Title) with the system-defined website name (SiteName) through the `tdk` filter and output to`Tag?</h1>
<div class="flex items-center gap-4 text-sm text-gray-400 dark:text-gray-500 mb-6 pb-6 border-b border-gray-100 dark:border-gray-800">
<span>📅 2025-11-08</span>
<span>👁️ 49</span>
</div>
<p>In website operations, the importance of the <code><title></code> tag is self-evident; it is not only the key for search engines to understand the page theme, but also the content that users see first in the search results.A well-crafted page title that can effectively improve click-through rate and have a positive impact on SEO optimization. Therefore, how to organically combine the core title of the article with the brand name of the website to form a title that is both accurate and attractive, is a fundamental and important aspect of website template design.</p>
<p>AnQiCMS is an enterprise-level content management system with rich features, which provides great flexibility in template design. Its template engine uses a syntax structure similar to Django.This means that you can output dynamic content by using double curly braces<code>{{ variable }}</code> and call various built-in functions and logical controls by using single curly braces and the percent sign<code>{% tag %}</code>.This design allows even non-professional developers to relatively easily understand and modify the template.</p>
<p>To implement the feature of concatenating the article title with the website name and outputting it to the<code><title></code> tag in the AnQiCMS template, we need to make use of several core features provided by the AnQiCMS template: getting article details, getting system settings, and a universal<code>tdk</code> filter specifically used for processing page SEO meta information.</p>
<p>First, the article title is the core content identifier of the page. When you visit a specific article detail page, AnQiCMS will automatically identify the article data on the current page.You can use the <code>archiveDetail</code> tag to get various properties of the article, including the title (<code>Title</code>).</p>
<p>Next, the site name (code SiteName code) is the unified name of the website that you configure in the By using the <code>system</code> tag, you can easily access this global setting in the template, including <code>SiteName</code>.<p>
<p>And the key to cleverly combine both and output to the <code><title></code> tag is the <code>tdk</code> filter provided by AnQiCMS.This filter is specifically designed to handle the page's <code>title</code>, <code>keywords</code>, and <code>description</code> SEO meta-information.It is very intelligent and can automatically retrieve the most relevant content based on the type of the current page (such as article detail page, category list page, or homepage).
To use the <code>tdk</code> filter to concatenate the article title and the website name, you need to use the syntax <code>{% tdk with name="Title" siteName=true %}</code> inside the <code><title></code> tag.Here: <p>
<ul>
<li><code name="Title">: Indicates the <code tdk>filter to get the title information of the current page.</code></li>On the article detail page, it tries to retrieve the article's <code>Title</code> field.</li>
<li><code>siteName=true</code>: This is a very convenient parameter that tells the <code>tdk</code> filter to automatically append the system-defined website name (<code>SiteName</code>) to the page title obtained.<li>
<li><code>sep=" - "</code>:You can also customize the separator between the title and the website name using the <code>sep</code> parameter, for example <code>"- "</code>、<code>" | "</code> or <code>"_ "</code> etc., the default is usually <code>-</code> or <code>_</code>.Choosing a separator that is both aesthetically pleasing and SEO-friendly is very important.</li>
</ul>
<p>Place the above code in the<code><head></code>area of the template file, and a typical article detail page's<code><title></code>tag will be like this:</p>
<pre><code class="language-html"><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Core Title Tag, automatically combine article title and website name -->
<title>{% tdk with name="Title" siteName=true sep=" - " %}</title>
<!-- You can also obtain the page keywords and description -->
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">
{# You can place other head content here, such as CSS links, Favicon, etc. #}
</head>
<body>
{# Main content of the website #}
</body>
</html>
</code></pre>
<p>When your website visitor browses an article named "AnQiCMS: The Secret Weapon of Efficient Content Management", if your website name is set to "AnQiCMS Official Station", then the final title displayed in the browser tab will be: "AnQiCMS: The Secret Weapon of Efficient Content Management - AnQiCMS Official Station".<p></p>
<p>It is worth mentioning that in the AnQiCMS article editing interface, you will usually find a field called “SEO Title (SeoTitle)”. This field allows you to set a specific title for the article, which will take precedence over the article's own <code>Title</code> field when the <code>tdk</code> filter retrieves the title.This means that if you set the "SEO title" for an article, the <code>tdk</code> filter will use that "SEO title" concatenated with the website name instead of the article's default title.This provides you with more refined SEO control capabilities, ensuring that each page has the most suitable title for search optimization. In this way, you do not need to write the <code><title></code> tag separately for each page, AnQiCMS will automatically handle it for you, greatly improving the efficiency of website management and SEO optimization.</p>\n\n<h2>\n\n<h3>Common Questions (FAQ)</h3>\n\n<p><strong>1. Why did I set <code>siteName=true</code>, but the website name did not show up in the <code><title></code> tag?This is usually because you have not filled in the "SiteName" field in the "Global Function Settings" of the AnQiCMS backend, or the field is left blank.Please check the background settings to ensure that the 2. How can I make the <code><title></code> tags on some pages only display the article title without concatenating the website name?</strong></p></p><p>You can set the parameter of the </code>tdk</code> filter's </code>siteName</code> to </code>false</code> in the page template that needs to be displayed separately, or simply omit the parameter (because the default value of </code>siteName</code> is </code>false</code>).For example, you can write: <code><title>{% tdk with name="Title" siteName=false %}</title></code> or directly <code><title>{% tdk with name="Title" %}</title></code>.This will make AnQiCMS only output the title of the current page without appending the website name.</p>
<p><strong>3. What is the use of the "SEO Title" field in the article?The "SEO Title" (SeoTitle) field of the article allows you to set an independent, optimized title for search engines, which will take precedence over the normal title you enter in the "Article Title" (Title) field when the <code>tdk</code> filter generates the <code><title></code> tag.In other words, if you have set the If you do not set it, the default 'Article Title' will be used. This design aims to provide you with greater flexibility, allowing you to use a normal 'Title' to attract readers, and a 'SEO Title' to meet search engine optimization needs.<p></p>
<article></article>
<!-- Prev / Next -->
<div class="mt-12 pt-6 border-t border-gray-200 dark:border-gray-800">
<nav class="flex items-center justify-between gap-4">
<div class="flex-1">
<a href="https://en.anqicms.com/blog/9421.html" class="prev-next-link group flex flex-col items-start px-5 py-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-blue-500 dark:hover:border-blue-400 transition-all duration-200 min-w-[140px]">
<span class="text-xs text-gray-400 dark:text-gray-500 mb-0.5">Previous</span>
<span class="text-sm font-medium text-gray-700 dark:text-gray-300 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"
</path>
</svg>
`dump` filter in Anqicms template debugging: What are some practices, and how can you clearly view the structure and value of complex variables?
</span>
</a>
</div>
<div class="flex-1 justify-end">
<a href="https://en.anqicms.com/blog/9423.html" class="prev-next-link group flex flex-col items-end px-5 py-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-blue-500 dark:hover:border-blue-400 transition-all duration-200 min-w-[140px]">
<span class="text-xs text-gray-400 dark:text-gray-500 mb-0.5">Next</span>
<span class="text-sm font-medium text-gray-700 dark:text-gray-300 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors flex items-center gap-1">
How to configure the separator (`sep`) and whether to display the parent category title (`showParent`) in `tdk` filter in Anqicms?
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
</svg>
</span>
</a>
</div>
</nav>
</div>
<!-- Related articles -->
<div class="mt-10">
<h3 class="text-base font-semibold text-gray-800 dark:text-gray-200 mb-4">相关文章</h3>
<div class="grid sm:grid-cols-2 gap-4">
<a href="https://en.anqicms.com/blog/9421.html" class="p-4 rounded-xl bg-gray-50 dark:bg-gray-900 hover:bg-blue-50 dark:hover:bg-blue-900/20 border border-gray-100 dark:border-gray-800 transition-colors group">
<h4 class="text-sm font-medium text-gray-800 dark:text-gray-200 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">`dump` filter in Anqicms template debugging: what practices are there, and how can complex variable structures and values be clearly viewed?}</a>
</div>
</div>In the process of developing Anqi CMS templates, we often encounter the need to view variable content and structure, especially when dealing with complex objects passed from the backend.If you can't clearly know what is inside the variable, debugging will be as difficult as a blind man feeling an elephant. Anqi CMS has adopted the Pongo2 template engine syntax similar to Django, providing rich tags and filters to help us build dynamic pages, one of which is a powerful debugging tool is the `dump` filter.
### `dump` filter</p>
<span class="text-xs text-gray-400 mt-2 block">2025-11-08</span>
</a>
<a href="https://en.anqicms.com/blog/9420.html" class="p-4 rounded-xl bg-gray-50 dark:bg-gray-900 hover:bg-blue-50 dark:hover:bg-blue-900/20 border border-gray-100 dark:border-gray-800 transition-colors group">
<h4 class="text-sm font-medium text-gray-800 dark:text-gray-200 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">How to safely output the backend transmitted HTML code in AnqiCMS template through `safe` filter and avoid escaping?In AnQi CMS, we often use its powerful and flexible template system to present a variety of content.The Anqi CMS template engine borrows the syntax of Django templates, bringing us a familiar development experience and powerful features. However, when handling HTML code passed from the backend to the frontend, we encounter an important security mechanism: **automatic escaping**.This article will delve into how to use the `safe` filter ingeniously in Anqi CMS templates to safely and elegantly output the HTML code passed from the backend</p> <span class="text-xs text-gray-400 mt-2 block">2025-11-08</span> </a>
<a href="https://en.anqicms.com/blog/9419.html" class="p-4 rounded-xl bg-gray-50 dark:bg-gray-900 hover:bg-blue-50 dark:hover:bg-blue-900/20 border border-gray-100 dark:border-gray-800 transition-colors group"> <h4 class="text-sm font-medium text-gray-800 dark:text-gray-200 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">How `urlize` and `urlizetrunc` filters automatically identify URLs and email addresses in Anqi CMS and convert them into clickable links?In Anqi CMS, we often encounter scenarios where we need to display website or email addresses in the article body, comments, or other user input text.If these addresses are just plain text, users cannot directly click to jump, which will greatly reduce the user experience of the website. Fortunately, Anqi CMS has built-in powerful template filters, among which `urlize` and `urlizetrunc` are special tools to solve this problem, which can automatically convert identified websites and email addresses into clickable HTML links.
###<p>
<span class="text-xs text-gray-400 mt-2 block">2025-11-08</span>
</a>
<a href="https://en.anqicms.com/blog/9418.html" class="p-4 rounded-xl bg-gray-50 dark:bg-gray-900 hover:bg-blue-50 dark:hover:bg-blue-900/20 border border-gray-100 dark:border-gray-800 transition-colors group">
<h4 class="text-sm font-medium text-gray-800 dark:text-gray-200 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">
How to handle automatic line breaks for long text in the `wordwrap` filter of Anqicms template to avoid layout chaos or overflow? In website content operation, we often encounter scenarios where text content is too long, causing page layout to be disordered and even overflow the container, seriously affecting user experience.Especially when a continuous English word without spaces or a long Chinese word appears in a narrow area, the default line-breaking mechanism of the browser may not meet our design needs.Fortunately, Anqi CMS provides a very practical tool for template developers to elegantly solve this problem - that is the `wordwrap` filter.This `wordwrap` filter</p> <span class="text-xs text-gray-400 mt-2 block">2025-11-08</span> <a href="https://en.anqicms.com/blog/9423.html" class="p-4 rounded-xl bg-gray-50 dark:bg-gray-900 hover:bg-blue-50 dark:hover:bg-blue-900/20 border border-gray-100 dark:border-gray-800 transition-colors group"> <h4 class="text-sm font-medium text-gray-800 dark:text-gray-200 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">How to configure the separator (`sep`) and whether to display the parent category title (`showParent`) in `tdk` filter of Anqicms?In the process of website operation and SEO optimization, the page title (Title) is a key element to attract user clicks and improve search engine rankings.AnQiCMS provides a flexible `tdk` filter, allowing us to finely control the display of the page TDK (Title, Description, Keywords).Among these, the `sep` and `showParent` parameters play an important role in constructing page titles with rich hierarchy and clarity.
Next</p>
<span class="text-xs text-gray-400 mt-2 block">2025-11-08</span>
</a>
<a href="https://en.anqicms.com/blog/9424.html" class="p-4 rounded-xl bg-gray-50 dark:bg-gray-900 hover:bg-blue-50 dark:hover:bg-blue-900/20 border border-gray-100 dark:border-gray-800 transition-colors group">
<h4 class="text-sm font-medium text-gray-800 dark:text-gray-200 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">How to use the `stringformat` filter to format price numbers as currency in Anqicms templates (e.g., "¥%.2f")?On a website, when displaying product or service prices, we all hope that they look clear and professional, easy to understand.A string of price numbers without currency symbols and inconsistent decimal places not only affects the appearance but may also raise doubts about the professionalism of the product. Fortunately, AnQiCMS (AnQiCMS) provides a powerful template engine with a variety of practical filters, among which the `stringformat` filter is a powerful tool for formatting numbers into standard currency formats.This article will guide you on how to use the </p> in AnqiCMS templates,\n\n <span class=\The <h4> tag is used in the template design of AnQi CMS, and we often encounter scenarios where variable formatting output is required.At this point, the `stringformat` filter is particularly important, as it helps us clearly display numbers, strings, and even other types of data in the format we set.However, when using such tools, a common and critical question is: how will `stringformat` handle when the variable itself is null or invalid?Is it a direct error that causes the page to crash, or is there a more elegant default behavior? \n\n###<p></p>\n <span class=\In website operations, the comment area and message board are important channels for interacting with users and collecting feedback.However, this area where users can freely fill in content also often becomes an entry point for potential security risks, especially cross-site scripting (XSS) attacks. As a website administrator, we must ensure that the content entered by users is safe to display on the front end and is not maliciously exploited.AnQi CMS, as a system focused on providing a secure and efficient content management solution, has provided us with powerful tools to meet such challenges. Today-- Sidebar categories -->\n \u003caside class=\\-- Search -->
<div class="mb-4 max-w-lg mx-auto">
<form action="/search" method="get">
<div class="relative">
<svg class="absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
<input type="text" name="q" placeholder="Search articles..." value="" class="w-full pl-12 pr-4 py-3 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
</form>
</div>
<nav class="space-y-1 bg-white top-24">
<a href="/help/" class="block px-3 py-2 text-sm font-medium rounded-lg text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 transition-all">All Articles</a>
<a href="https://en.anqicms.com/help" class="block px-3 py-2 text-sm font-medium rounded-lg text-gray-600 dark:text-gray-400 hover:text-blue-600 hover:bg-gray-50 dark:hover:bg-gray-800 transition-all">Anqicms Help</a>
<a href="https://en.anqicms.com/manual" class="block px-3 py-2 text-sm font-medium rounded-lg text-gray-600 dark:text-gray-400 hover:text-blue-600 hover:bg-gray-50 dark:hover:bg-gray-800 transition-all">Anqicms Template Tag Manual</a>
<a href="https://en.anqicms.com/anqiapi" class="block px-3 py-2 text-sm font-medium rounded-lg text-gray-600 dark:text-gray-400 hover:text-blue-600 hover:bg-gray-50 dark:hover:bg-gray-800 transition-all">Anqicms API Help</a>
<a href="https://en.anqicms.com/changelog" class="block px-3 py-2 text-sm font-medium rounded-lg text-gray-600 dark:text-gray-400 hover:text-blue-600 hover:bg-gray-50 dark:hover:bg-gray-800 transition-all">Anqicms Update Log</a>
<a href="https://en.anqicms.com/plugin" class="block px-3 py-2 text-sm font-medium rounded-lg text-gray-600 dark:text-gray-400 hover:text-blue-600 hover:bg-gray-50 dark:hover:bg-gray-800 transition-all">Anqicms Feature Introduction</a>
</nav>
<div class="mt-8">
<h3 class="text-sm font-semibold text-gray-800 dark:text-gray-200 mb-3 px-1">Related Recommendations</h3>
<div class="space-y-2">
<a href="https://en.anqicms.com/blog/3480.html" class="block p-3 rounded-xl bg-gray-50 dark:bg-gray-800/50 hover:bg-blue-50 dark:hover:bg-blue-900/10 border border-gray-100 dark:border-gray-800/50 hover:border-blue-200 dark:hover:border-blue-800 transition-all group">
<h4 class="text-sm font-medium text-gray-700 dark:text-gray-300 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors line-clamp-2">How to enable remote debugging in Chrome browser, supporting Windows and MacOS, Linux</h4>
<p class="text-xs text-gray-400 mt-1 line-clamp-2">The following are the methods to enable remote debugging in Chrome browser on various operating systems: Windows operating system: Make sure you have installed Chrome browser and it is up to date.Open a Command Prompt window (press Win + R, enter \Supported systems support Windows 7, Windows 8, Windows 10, Windows 11, W...How to choose the right corporate website building program has become one of the issues that enterprises must consider. So, how to choose the most suitable one among the many website building programs?The company should consider its own needs. The basic requirements for a corporate website should be: stable, secure, easy to use, and comprehensive in features. Therefore, when choosing a website building program, the company needs to focus on these aspects.In terms of stability, it is recommended to choose large-scale website building programs or open-source projects that have been optimized multiple times. For example, WordPress, Discuz</p>
<span class="text-xs text-gray-400 mt-1.5 block">2023-04-12</span>
</a>
<a href="https://en.anqicms.com/blog/3476.html" class="block p-3 rounded-xl bg-gray-50 dark:bg-gray-800/50 hover:bg-blue-50 dark:hover:bg-blue-900/10 border border-gray-100 dark:border-gray-800/50 hover:border-blue-200 dark:hover:border-blue-800 transition-all group">
<h4 class="text-sm font-medium text-gray-700 dark:text-gray-300 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors line-clamp-2">The benefits of building a corporate website with Anqicms</h4>
<p class="text-xs text-gray-400 mt-1 line-clamp-2">In recent years, with the rapid development of Internet technology, more and more enterprises have realized the importance of establishing their own official website on the Internet.While establishing an enterprise website, how to choose a stable, easy-to-use, and feature-rich CMS platform is also a key issue that enterprises need to consider.Among many CMS platforms, AnQi CMS is undoubtedly an excellent solution worth choosing for enterprises. AnQi CMS is an open-source enterprise website management system, with many advantages, especially suitable for building corporate websites.First, Anqi CMS has a rich collection of templates and plugins resourcesRecommend using Anqi CMS system for Tongliao website construction, compared to other CMS systems, Anqi CMS system has many advantages, the first is that the program is 100% source code developed, free and open source, which is very convenient for secondary development.Secondly, the background management operations are simple and easy to use, which is also very important for enterprises without technical expertise</p> <span class="text-xs text-gray-400 mt-1.5 block">2023-04-12</span> </a> <a href="https://en.anqicms.com/blog/3474.html" class="block p-3 rounded-xl bg-gray-50 dark:bg-gray-800/50 hover:bg-blue-50 dark:hover:bg-blue-900/10 border border-gray-100 dark:border-gray-800/50 hover:border-blue-200 dark:hover:border-blue-800 transition-all group"> <h4 class="text-sm font-medium text-gray-700 dark:text-gray-300 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors line-clamp-2">What content and methods are needed to build a corporate website</h4> <p class="text-xs text-gray-400 mt-1 line-clamp-2">In today's internet age, a corporate website has become a window for an enterprise's brand promotion. Building an excellent corporate website is a problem that every enterprise must face and cannot ignore.</p>What should be considered and what methods should be used when building a corporate website? 1. Positioning Before planning a corporate website, we first need to clarify the positioning of the website, that is, the theme and design concept of the site, as well as the content and style to be displayed.This is the core of website building</p>
<span class="text-xs text-gray-400 mt-1.5 block">2023-03-20</span>
</a>
</div>
</div>
</aside>
</div>
</div>
</section>
<!-- ==================== FOOTER ==================== -->
<footer class="border-t border-gray-200 dark:border-gray-800 bg-white dark:bg-[#0f172a]">
<div class="max-w-[1440px] mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div class="grid grid-cols-2 lg:grid-cols-4 gap-8">
<div>
<div class="flex items-center gap-2.5 mb-4">
<div class="w-8 h-8 flex items-center justify-center">
<img src="https://en.anqicms.com/uploads/202606/15/2144e205d561d0a5.webp" alt="Anqitech CMS" />
</div>
<span class="text-lg font-bold text-gray-800 dark:text-gray-100">Anqitech CMS</span>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400 leading-relaxed">Built with GoLang, reducing memory usage by about 80% compared to PHP CMS, supporting multi-site, multi-language, AI intelligent conversation and tool calls, an optimal solution for small and medium-sized enterprises to build high-performance websites. </p>
</div>
</div>
</div>
</footer></p>\n <div class=\
al.src = "/api/log?action=views&code=200&id=9422&path=http%3A%2F%2Fwww.anqicms.com%2Fblog%2F9422.html&type=archive&nonce="+Date.now();document.body.appendChild(al);
)));\n\u003c/script\u003e\n\n\u003c/html\u003e