As an experienced CMS website operations manager for a security company, I fully understand the core position of the category page in the website structure and SEO strategy.A meticulously optimized categorization page that not only helps users quickly find the content they need, but also effectively enhances the crawling efficiency and ranking of search engines.In Anqi CMS, we can accurately control the SEO metadata of each category page through a flexible tag system.
In AnQi CMS, obtaining the SEO title, keywords, and description of a specified category page, although it can be partially dependentcategoryDetailLabel to get basic information, but a more comprehensive and recommended approach is to use both.Universal TDK tagstdk.tdkTags are specially designed by the system for outputting the header SEO metadata of pages. It intelligently assembles or calls the SEO information configured in the background according to the current page type (including category pages).
Configure the SEO information for the category page
Firstly, we need to understand how SEO information is configured for category pages in the Anqi CMS backend. In the 'Document Category' feature under the content management module, when we edit or create a category, we will find that the 'Other Parameters' section provides dedicated SEO settings.
- SEO titleThis is the independent title set for the category page, which will be displayed in the browser tab and search engine results.If not set here, the system will usually use the category name as the default title.
- KeywordsTo specify related keywords for the category page, use English commas between multiple keywords.
,These keywords help search engines understand the theme of the category page. - Category IntroductionHere you fill in the category introduction, which will not only be displayed on the page content, but more importantly, it will serve as the Meta Description of the category page, that is, the content of the page description tag.
These meticulously configured SEO information in the background are the basis for us to obtain and display SEO metadata in the front-end template.
UtilizetdkTagging to obtain SEO metadata
In the template design of AnQi CMS, in order to inheadRegionally correct output SEO title (Title), keywords (Keywords), and description (Description) metadata, the most recommended and powerful tag istdk.tdkTags can intelligently identify whether the current page is a category page, a document page, or any other special page, and automatically obtain and render the most appropriate SEO information according to the backend configuration.
Get SEO Title (Title)
UsetdkThe SEO title acquisition for the category page is very intuitive.It will automatically prioritize to grab the 'SEO Title' field set for the category in the background.If the 'SEO Title' is empty, the category's 'Category Name' will be used, and the site name can be optionally appended.
<title>{% tdk with name="Title" siteName=true sep=" - " %}</title>
In this code block:
name="Title"Specify that we are getting the page title.siteName=trueIndicates appending the website name after the category title, which is very useful for brand display and long-tail keyword optimization.sep=" - "defines the separator between the category title and the website name, with the default being-.
Get SEO Keywords (Keywords)
Similarly,tdkThe label is also responsible for obtaining the SEO keywords of the category page. It directly calls the 'Keywords' field configured for the category in the background.
<meta name="keywords" content="{% tdk with name="Keywords" %}">
Here are thename="Keywords"Indicate label returns the keyword string of the current page, used directly for<meta name="keywords">Tagscontentproperties.
Get SEO description (Description)
The description information of the category page is also throughtdkIt retrieves a label to get, which will call the background to fill in the 'Category Introduction' for the page Meta Description.
<meta name="description" content="{% tdk with name="Description" %}">
name="Description"Ensure that we have obtained the description content of the classification page, for<meta name="description">Label.
categoryDetailThe role and limitations of tags
AlthoughcategoryDetailTags do not directly provide an integrated SEO metadata output, but they play an important role in obtaining the category's own properties, including the category name and category description, which are part of the SEO metadata.Original Components.
Get Category Name (Title):
categoryDetailCan get the display name of the category.<div>当前分类名称:{% categoryDetail with name="Title" %}</div>This
TitleIt is the name displayed on the website frontend for the category, which may betdkThe label is used as the default SEO title.Get category description (Description):
categoryDetailCan get the brief content of the category.<div>当前分类简介:{% categoryDetail with name="Description" %}</div>This
DescriptionIt is the text introduction of the category, which will betdkThe tag is directly used for the page's Meta Description.
categoryDetailThe main purpose of the tag is to obtain the category ID, link, parent information, image, etc.Classification's detailed dataTo display category-related information or build navigation in the page content area.For example, you may need to display the full description text of the category on the page, or show a category thumbnail in the list.
{# 示例:在页面中显示分类的名称和完整描述 #}
<h1>{% categoryDetail with name="Title" %}</h1>
<p>{% categoryDetail with name="Description" %}</p>
Practical Suggestions
Manage the category page SEO in Anqi CMS, my suggestion is:
- Back-end configuration takes precedenceAlways fill in the 'SEO Title', 'Keywords', and 'Category Description' in detail on the category editing page of the Anqi CMS backend. This is the foundation and core of SEO optimization.
tdkTags are used for<head>: In the template files<head>part, usetdktags to output<title>/<meta name="keywords">and<meta name="description">. This is the practice to ensure the completeness, accuracy of page SEO metadata, and follow the internal logic of CMS.categoryDetailFor content areaon the page<body>part, use it when you need to display the specific content such as category name, description, images, etc.categoryDetailTo label the data. For example, you may need to display the category overview as part of the page text or as an introduction to a module.
By this division of labor, you can ensure that the SEO metadata of the category page remains consistent and accurate throughout the website, while also being flexible in calling and displaying detailed information about the category within the page content.
Common Questions and Answers (FAQ)
1. Why does the front-end still display the category name instead of the 'SEO title' I set for the category?<title>This is usually because your template uses tags, but they are not configured correctly.
This usually happens because your template usestdktags, but they are not configured correctly.siteNameorsepparameter, or intdkthe tag processing logic, the priority of "SEO Title" is lower than other settings. Please check your template code to ensuretdkThe label can correctly retrieve and output the "SEO Title" you set in the background. If the "SEO Title" field in the background is empty,tdkTags will intelligently revert to using "Category Name" as the title.
2.categoryDetailCan tags directly obtain the "SEO Title" and "Keywords" fields that I have set on my backend?
According to the Anqi CMS tag document,categoryDetailTagsnameNo parameter is directly exposed with the nameSeoTitleorKeywordsfield.categoryDetail主要用于获取分类的基本属性,如Title(Category Name) andDescription[en] (Category overview), these are components of the SEO metadata but not the final SEO output. To obtain the final SEO title, keywords, and description, use the dedicatedtdkTags, it aggregates all SEO-related information configured on the backend and performs priority processing.
If I want to display the 'custom URL' of a category instead of its ID on the category page, which tag should I use?
You can usecategoryDetailUse tags to get the custom URL alias for category.When configuring categories in the background, you can set the 'Custom URL' field.categoryDetailofLinkfield in.
<div>当前分类自定义链接:<a href="{% categoryDetail with name="Link" %}">{% categoryDetail with name="Title" %}</a></div>
Please note that the effectiveness of using custom URLs also depends on the configuration of the website's pseudo-static rules.