Hello! As an experienced AnQi CMS website operator, I am very happy to give you an in-depth explanation of how to efficiently manage and use document tags in AnQiCMS.Document tags are not only a powerful supplement to content classification, but also a key tool for improving user experience and search engine optimization.
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, but more like a flexible topic classification mechanism that can organically associate content spanning different categories and content models.AnQi CMS understands its importance and provides 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.
Manage document tags in the background
In the AnQiCMS backend management interface, you can enter the 'Document Tag' function through the 'Content Management' module.This is the center where you create, edit, delete, and overview all tags.
When you need to create a new document tag, the system will prompt you to fill in some key information. First isTag NameThis is the text displayed on the front end as a 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 front-end design.
To improve the search engine optimization effect, you can configure tags.Custom URL. Custom URLs will be used as pseudo-static links for tab pages, and it is recommended to use lowercase letters, numbers, and underscores, and ensure their uniqueness throughout the site.The system will automatically generate a Pinyin URL based on the tag name, but if more precise control is needed, manual setting is a better choice. In addition,SEO title/Tab keywordsandTab descriptionThese fields are also important, and they will directly affect the visibility and ranking of the tag page in search engines.Filling in this information reasonably helps search engines better understand your tag content, thereby attracting more target users.
The process of adding tags to documents in the content publishing process is also very intuitive.When you publish a document or edit an existing document under "Content Management", there will be a "Tag label" input box at the bottom of the document editing interface.You can select existing tags here, or directly enter a new tag name, then press Enter to convert it into a new tag and associate it with the current document.A document can have multiple tags, which greatly enhances the flexibility and discoverability of the content through multidimensional association.
Document tag display and application on the front end
The true value of document tags lies in their display on the website front end and optimization of the user browsing experience.AnQiCMS provides various template tags, allowing you to flexibly call and display these tags and their associated content at any location on the website.
first, tagListTags are used to display the document tag list. Whether you want to display all the tags of the current document on the document detail page, or display the hot tag cloud in the website sidebar, footer, and other locations,tagListCan meet all needs. It supports throughitemIdSpecify the label of a specific document, throughlimitControl the number of displayed items, even byletter(index letters) orcategoryId(Label category ID, although document labels are not categorized and modeled, you can still use advanced filtering according to your needs) filtering. Through the looptagListThe label data obtained, you can easily build label navigation or label 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 label to enter the label detail page,tagDetailThe tag can retrieve the detailed information of the tag. This includes tag ID, title, link, description, index letter, and any content or Logo set in the background.This helps to display more background information about the tags on the label page, enhancing the richness of the page content. For example:
<div>Tag标题:{% tagDetail with name="Title" %}</div>
<div>Tag描述:{% tagDetail with name="Description" %}</div>
Finally, and most importantly,tagDataListThe tag can retrieve the list of all associated documents under the specified tag. This is usually used to build the archive page of the tag, allowing users to easily view all the content related to the tag.tagDataListSupports rich filtering parameters such astagId(Specify Tag ID,)moduleId(Filtering specific content model documents),order(Sorting methods, such as by publication time or views) andlimit(Display quantity). What's more, it supportstype="page"Parameter, this means you can combinepaginationTag, to implement pagination for the tag archive page, improving 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 using these tags, you can build a powerful, flexible, and SEO-friendly content cross-referencing system for the website, thereby effectively increasing the user's stay time on the website and enhancing 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 creation and fine-tuning on the back-end 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 utilizing these features, you can make the website content more diverse and rich, providing a smoother user experience, thereby enhancing the overall competitiveness of the website.
Frequently Asked Questions (FAQ)
1. What is the difference between document tags and document categories? How should I choose to use them?
A document classification is a hierarchical structured content organization method, for example, 'News Center' has 'Industry Dynamics', 'Company News'.Each document usually belongs to only one main category. The document tags are a flattened, non-hierarchical keyword association method, which pays more attention to the topic of the content.A document can have multiple tags, which can span different categories and content models.
Choose to use it when the content has clear hierarchical attribution and it is desired to guide users through hierarchical navigation, the category should be used first.If the content revolves around a specific topic or keyword and this topic may appear in 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", and other tags.
2. How to ensure that document tags are SEO-friendly?
To make document tags SEO-friendly, the following points need to be considered:
- Tag names and keywords:Ensure that the tag name is accurate, concise, and includes the target keywords. Additionally, fill in the independent SEO title, keywords, and description for the tag page in the background.
- Custom URL:Set a meaningful custom URL (pseudo-static) for the tag, for example
/tag/anqicms-new-feature.htmlInstead of the default ID format, which helps search engines understand the content of the tag page. - Content richness:The tag page is not just a document list, you can fill in the tag description in the tag details on the back end (
Content), providing additional text content for the tag page, increasing the information quantity and keyword density. - Internal Link:Ensure that tag links are accessible 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 damage SEO.
3. What will be displayed when a tag is called in a template if it is not associated with any document?
When you usetagListortagDataListWhen tags loop through content and have no associated data,forin the loop{% empty %}The block will be executed. You canemptyFriendly prompt information defined in the block, such as 'There is no content under this tag' or 'This list has no content', rather than displaying blank or error messages, thus improving the user experience.