Hello!As an experienced AnQi CMS website operation personnel, I am very happy to give you an in-depth explanation of how to efficiently manage and use document tags in AnQiCMS.The document tag is not only a powerful supplement to content classification, but also a key tool for improving user experience and search engine optimization.
How to manage and use document tags in AnQi CMS
In a content management system, the role of tags is not just to label content with simple keywords, it is more like a flexible topic classification mechanism that can organically associate content spanning different categories and content models.The CMS knows its importance, providing users with a comprehensive and easy-to-use tag management feature, aiming to help operators better organize content and enhance the interconnectivity of the website.
Management of background document tags
In AnQiCMS backend management interface, you can enter the 'Document Tag' feature through the 'Content Management' module.This is the center where you can create, edit, delete, and view all tags.
When you need to create a new document label, the system will prompt you to fill in some key information. First isTag nameThis is the text displayed on the front end for the label, it should be concise and clear, accurately reflecting the topic represented by the label. Next isIndex letterIt is usually the first letter of the tag name, used for indexing or sorting in some frontend design.
To improve the search engine optimization effect, you can configure the tag.Custom URL.The custom URL will be used as a pseudo-static link for the tab page, it is recommended to use lowercase letters, numbers, and underscores, and ensure its uniqueness throughout the site.The system will automatically generate a pinyin URL based on the tag name by default, but manual settings are a better choice if more precise control is needed.SEO title/Tag keywordsandLabel IntroductionThese fields are also important, as they will directly affect the visibility and ranking of the tag page in search engines.Help search engines better understand your tags by filling in this information appropriately, thereby attracting more targeted users.
In the process of publishing content, the process of adding tags to the document is also very intuitive.When you publish documents or edit existing documents under 'Content Management', there will be an input box for 'Tag tags' at the bottom of the document editing interface.You can select an existing tag here, or directly enter a new tag name, and then press Enter to convert it into a new tag and associate it with the current document.An article can have multiple tags, and this multidimensional association feature greatly enhances the flexibility and discoverability of the content.
Document label display and application on the front end
The true value of the document tag lies in its display on the website's front end and its optimization of the user's browsing experience.AnQiCMS provided various template tags, allowing you to flexibly call and display these tags and their associated content at any location on the website.
Firstly,tagListLabels are used to display the document tag list. Whether you want to show all the tags of the current document on the document detail page, or display popular tag clouds in the website sidebar, footer, and other locations,tagListCan meet all requirements. It supports accessing throughitemIdSpecifying tags for specific documents, bylimitControlling the number of items displayed, evenletter(alphabetical index) orcategoryId(Tag category ID, although document tags are not categorized and modeled, you can still perform advanced filtering as needed). Filter through the loop.tagListRetrieved tag data, you can easily build tag navigation or tag cloud, for example:
<div>
文档Tag:
{% tagList tags with limit="10" %}
{% for item in tags %}
<a href="{{item.Link}}">{{item.Title}}</a>
{% endfor %}
{% endtagList %}
</div>
Secondly, when the user clicks on a tag to enter the tag detail page,tagDetailThe label can retrieve the detailed information of the label.This includes the tag ID, title, link, description, index letter, and any content or Logo set in the background.This helps to display more background information of tags on the label page, enhancing the richness of the page content.
<div>Tag标题:{% tagDetail with name="Title" %}</div>
<div>Tag描述:{% tagDetail with name="Description" %}</div>
Finally, and most importantly,tagDataListThe label can retrieve all associated document lists under a specified label. This is usually used to build the label's archive page, allowing users to easily view all content related to the label.tagDataListSupports rich filtering parameters, such astagId(Specified Tag ID)、moduleId(filtering specific content model documents),order(sorting methods, such as by publication time or view count) as well aslimit(number of displayed items). What's more, it supportstype="page"Parameter, this means that you can combinepaginationTag, to implement pagination for the tag archive page, enhancing browsing performance and user experience under a large amount of content.
{# 假设这是tag/list.html模板,自动获取当前TagId #}
<div>
{% tagDataList archives with type="page" limit="10" %}
{% for item in archives %}
<li>
<a href="{{item.Link}}">
<h5>{{item.Title}}</h5>
<div>{{item.Description}}</div>
<div>
<span>{% categoryDetail with name="Title" id=item.CategoryId %}</span>
<span>{{stampToDate(item.CreatedTime, "2006-01-02")}}</span>
<span>{{item.Views}} 阅读</span>
</div>
</a>
{% if item.Thumb %}
<a href="{{item.Link}}">
<img alt="{{item.Title}}" src="{{item.Thumb}}">
</a>
{% endif %}
</li>
{% empty %}
<li>
该列表没有任何内容
</li>
{% endfor %}
{% endtagDataList %}
{# 分页代码 #}
<div>
{% pagination pages with show="5" %}
<a class="{% if pages.FirstPage.IsCurrent %}active{% endif %}" href="{{pages.FirstPage.Link}}">{{pages.FirstPage.Name}}</a>
{% if pages.PrevPage %}<a href="{{pages.PrevPage.Link}}">{{pages.PrevPage.Name}}</a>{% endif %}
{% for item in pages.Pages %}<a class="{% if item.IsCurrent %}active{% endif %}" href="{{item.Link}}">{{item.Name}}</a>{% endfor %}
{% if pages.NextPage %}<a href="{{pages.NextPage.Link}}">{{pages.NextPage.Name}}</a>{% endif %}
<a class="{% if pages.LastPage.IsCurrent %}active{% endif %}" href="{{pages.LastPage.Link}}">{{pages.LastPage.Name}}</a>
{% endpagination %}
</div>
</div>
By reasonably utilizing these tags, you can build a powerful, flexible, and SEO-friendly content cross-referencing system for the website, thereby effectively enhancing users' stay time on the website and increasing the exposure opportunities of the content.
Summary
The document tag management function of Anqi CMS provides a complete and efficient content organization tool for website operators.From the backend creation and fine-tuning to the flexible invocation and display of front-end templates, tags play an indispensable role in content association, user navigation, and search engine optimization.By deeply understanding and skillfully using these features, you can make the website content more rich and diverse, and the user experience more smooth, thereby enhancing the overall competitiveness of the website.
Common Questions and Answers (FAQ)
1. What is the difference between document tags and document categories? How should I choose which to use?
The document classification is a hierarchical content organization method, for example, under 'News Center' there are 'Industry News' and 'Company News'.Each document usually belongs to only one main category.The document tags represent a flat, non-hierarchical keyword association method, which pays more attention to the topic nature of the content.A document can have multiple tags, which can span different categories and content models.
When selecting to use, if the content has a clear hierarchical classification and it is desired to guide users through hierarchical navigation, it should be prioritized to use categories.If the content is centered around a specific topic or keyword, and this topic may appear under multiple categories, or if you want to provide more flexible cross-references, then tags are a better choice.For example, an article titled 'AnQi CMS New Feature Release' can be categorized under 'Company News' and tagged with 'AnQiCMS', 'New Feature', 'Content Management', etc.
2. How to ensure document tags are SEO-friendly?
To make document tags SEO-friendly, you need to pay attention to the following points:
- Tag names and keywords:Ensure that the label name is accurate, concise, and includes the target keywords. Additionally, fill in a separate SEO title, keywords, and description for the label page in the backend.
- Customize URL:Set a meaningful custom URL (pseudo-static) for the label, for example
/tag/anqicms-new-feature.htmlInstead of the default ID format, which helps search engines understand the content of the label page. - Content richness:Label page is not just a document list, you can fill in the label introduction in the label details on the back end (
Content),To provide additional text content for the label page, increase the information quantity and keyword density of the page. - Internal link: Ensure that the tag link can be accessed at multiple locations on the website, such as through tag clouds, related tag recommendations, etc., to increase the weight of the tag page.
- Avoid Over-Optimization:Do not create too many tags, or add tags to unrelated documents, as this may lead to keyword stacking or sparse content, which can actually harm SEO.
3. When calling tags in a template, what will be displayed if the tag is not associated with any document?
When you usetagListortagDataListWhen looping through tags to display content, if there is no associated data,forIn the loop{% empty %}The block will be executed. You canemptyBlock defines friendly prompt information, such as “There is no content under this tag” or “This list has no content”, instead of displaying blank or error messages, thus improving the user experience.