How to use the new AnQiCMS v2.1.0 article and product Tag label feature?

Hello! As an experienced AnQiCMS website operator, I am very happy to deeply interpret the new article and product Tag tag function added in AnQiCMS v2.1.0 version for you.This feature plays an important role in daily content operation and SEO optimization, helping us to organize content more flexibly and improve user experience.


AnQiCMS v2.1.0 article and product Tag feature details: Content association and new SEO optimization tool

AnQiCMS v2.1.0 version introduced the long-awaited article and product Tag label feature, greatly enriching the flexibility of content management and display.This new feature allows operations personnel to add multi-dimensional tags to articles and products through keywords, thereby breaking through the limitations of traditional classification and achieving free association of content across different themes.For website operation, Tag tags are not only tools for content aggregation, but also key elements for improving user discovery efficiency and optimizing search engine performance.

What is the article and product Tag?

In AnQiCMS, Tag is a supplementary classification method used to describe the theme or keywords of articles or products.Tags are flat and different from the hierarchical categories (Category). An article or product can have multiple tags, and the same tag can be associated with multiple articles or products across different categories.For example, an article about “AnQiCMS template making skills” can be categorized under the “Tutorial” category, and tags such as “AnQiCMS”, “Template”, “SEO” can also be added.Such that, regardless of which keyword the user searches or which Tag they click, they can easily find the relevant content.

How to manage Tag tags in the AnQiCMS background?

The management operation of Tag tags is simple and intuitive, which conforms to the usability design concept of AnQiCMS all the time.

First, you can navigate to the "Content Management" module of the AnQiCMS backend, where you can find the "Document Tag" menu item.Click to enter and you will see the list of all created Tag tags and can perform operations such as "add", "edit", and "delete".

When adding or editing a Tag label, you can fill in the following key information:

  • Tag Name: This is the display name of the Tag label, which will be displayed directly on the website front-end.
  • Index letterUsed for quick retrieval and sorting of Tag tags, usually the first letter of the tag name (A-Z).
  • Custom URL: To optimize the SEO effect, you can set a friendly pseudo-static URL for the Tag tag.AnQiCMS will automatically generate pinyin aliases based on tag names, you can also manually modify them, but make sure they are unique throughout the site.
  • SEO title, tag keywords, tag descriptionThese fields are specially designed for SEO. Filling out this information reasonably helps search engines better understand the theme of the Tag page, thereby improving its visibility in search results.The label introduction is generally a brief summary of the content associated with the label.

It is worth emphasizing that the Tag label is cross-category and model-based.This means that, regardless of the content you are working with, whether it is an article model or a product model, you can share and use the same set of Tag tags to establish connections between different types of content, realizing a broader thematic aggregation.

How to add Tag tags in articles or products?

Applying the Tag label to specific articles or products is also very convenient.

When you add or edit a document in the background "Content Management", you will see a special "Tag label" input box in the form.You can add one or more tags to the current article or product here.

The operation method is as follows: You can directly enter the label name in the input box.If the tag already exists in the system, AnQiCMS will provide intelligent hints for selection;If it is a new tag, just enter the full name and press Enter, the system will automatically recognize it and add it as a new tag.This flexible addition method allows you to expand your tag library while creating content.By attaching highly relevant Tags to each article and product, we can build a dense internal link network, greatly enhancing the relevance and SEO-friendliness of the website's content.

How to call the Tag label in AnQiCMS front-end template?

Displaying the Tag label on the website front end is the key to its function.AnQiCMS provides powerful template tags, allowing you to flexibly call Tag data on various pages.

1. Display the Tag label associated with the document

On the detail page of an article or product, we often need to display Tag tags related to the current content so that users can click to view more content on the same topic. This can be done bytagListTag implementation:

<div>
    文档Tag:
    {% tagList tags with limit="10" %}
    {% for item in tags %}
    <a href="{{item.Link}}">{{item.Title}}</a>
    {% endfor %}
    {% endtagList %}
</div>

In this example,tagListThe tag defaults to retrieving the Tag associated with the current document.limit="10"It limits the number of displayed tags. Inside the loop.item.Linkanditem.TitleIt outputs the link and name of the tag separately.

2. Get the Tag label details

When the user clicks on a Tag label, they enter the Tag detail page (for exampletag/detail.htmlWhen that happens, we may need to display the title, description, and other details of the Tag. At this time, you can usetagDetailTags:

<div>
    <h1>{% tagDetail with name="Title" %}</h1>
    <p>{% tagDetail with name="Description" %}</p>
    {% tagDetail with name="Logo" %}<img src="{% tagDetail with name="Logo" %}" alt="{% tagDetail with name="Title" %}" />
</div>

tagDetailThe tag defaults to getting the information of the current Tag page, throughnameSpecify the field to be retrieved.

3. Display the document list under a certain Tag.

On the Tag detail page, the most core function is to display all the associated articles and products under the Tag. This can be achieved bytagDataListLabel combinationpaginationTag to implement pagination:

<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.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>

tagDataListTags will be based on the current Tag page.tagIdAutomatically retrieve related documents.type="page"Turn on pagination mode and combine withpaginationTags to generate a complete pagination navigation.

SEO value of Tag tags

Tags play a significant role in SEO optimization:

First, Tag tags can effectively improve the keyword density and relevance of a website.By precisely adding keywords Tag to each article and product, you can clearly indicate the theme of the content to search engines, helping the content to rank better in related searches.

Secondly, the Tag page itself is a thematic aggregation page.When a large amount of related content is associated with a Tag, the search engine considers the Tag page to have a higher level of thematic expertise and thus assigns it a higher weight.

Finally, the Tag tag increased the opportunity for internal links on the website.When browsing articles, users can click on Tags to quickly jump to other related content. This not only improves the user experience but also builds a rich internal link structure, which is helpful for search engine spiders to fully crawl and index the website content.

Summary

AnQiCMS v2.1.0 adds the new article and product Tag label feature, bringing stronger content organization and distribution capabilities for content operation personnel.By means of flexible backend management and diversified frontend calling methods, we can easily achieve content cross-linking, creating a richer and more easily explored website structure.At the same time, making reasonable use of the SEO properties of Tag tags will bring better search engine performance and user stickiness to the website.


AnQiCMS Tag tag feature frequently asked questions (FAQ)

1. What is the difference between Tag tags and categories? When should I use Tag tags and when should I use categories?

Tag labels and categories are tools for organizing content, but their main difference lies in structure and purpose.Categories are hierarchical and are usually used to define the main content structure and navigation of a website, such as "news", "products", "tutorials", etc., where each piece of content typically belongs to only one or a few main categories.And the Tag label is flattened, used to describe the specific theme, keywords, or细分 characteristics of content, a content can have multiple Tags, and Tags can cross different categories.

You should use them in the following situations:

  • Use categories: When you need to establish a clear website navigation structure, organizing content by categories. Categories are usually the first level of entry for users to find content.
  • Use Tag tagsWhen you need to add more granular descriptions to content, implement multidimensional content association, or aggregate content on specific themes.Tags help improve the discoverability of content and provide more keyword landing pages for SEO.

2. Can I display the content of a specific model (such as only displaying articles, not products) on a Tag tag page?

Yes, you can. In the AnQiCMS front-end template, when you usetagDataListtags to get the document list under a certain Tag, you can addmoduleIdParameters are used to specify the content model that needs to be displayed. For example, if you only want to display the content of the article model on the Tag page (assuming ID 1), you can use it like this:

{% tagDataList archives with type="page" limit="10" moduleId="1" %}
    {# ... 循环显示文章内容 ... #}
{% endtagDataList %}

Thus,tagDataListIt will only retrieve and display the content associated with the Tag under the article model.

What if a Tag label's name is too long and it affects the layout when displayed on the front end?

In the AnQiCMS template, you can use built-in filters to process the display name of Tag tags to avoid long names affecting layout. Common filters includetruncatechars(Character truncation) andtruncatewords(Word truncation).

For example, if you want the Tag name to display a maximum of 10 characters, the extra part will be indicated by an ellipsis, and it can be used like this:

<a href="{{item.Link}}">{{item.Title|truncatechars:10}}</a>

You can also adjust the truncation length as needed, or further optimize the layout with CSS styles.