How to generate a clickable table of contents (TOC) based on the title structure of the article content?

Calendar 👁️ 71

In AnQiCMS (AnQiCMS), generating a clickable table of contents (Table of Contents, TOC) for your article detail page is a very practical feature.It can not only significantly improve the user's reading experience, help readers quickly locate the chapters they are interested in, which is particularly important for long content, but also optimize the page's SEO performance to some extent.AnQi CMS provides a very practical mechanism to help us achieve this, the core lies in the clever use of the title structure of the article content.

Understand how AnQi CMS retrieves the article title structure

To build a catalog, you first need to retrieve information about all the titles in the article. AnQi CMS document details tagarchiveDetailProvided a very critical field -ContentTitlesThis field can automatically parse the titles (such as H1, H2, H3, etc.) in the article content and return an array in a structured format, each item of which includes the text of the title, the HTML tag type (such as "H2"), and the level (such as H2

Related articles

How does AnQiCMS manage and display single-page content, such as 'About Us' or 'Contact Information'?

In website operations, single-page content such as "About Us", "Contact Information", "Service Introduction", and "Privacy Policy" is a core element in building the basic information of the website, enhancing user trust, and facilitating users in quickly obtaining information.These pages usually have fixed content, but their importance is self-evident.AnQiCMS provides an intuitive and powerful single-page management mechanism that allows you to easily create, manage, and display these key contents.### Create and Edit Single Page Content: Starting from the Backend Manage Single Page Content in Anqi CMS

2025-11-09

How to customize the shutdown prompt displayed to users when the website is closed?

During the operation of the website, we sometimes encounter situations where we need to temporarily close the website, such as system upgrades, server migrations, major content adjustments, or simply brief technical maintenance.How can you clearly and friendliness convey the current status of the website to the visitors at this time and provide necessary information, which is particularly important.AnQiCMS provides comprehensive shutdown management functions for website administrators, allowing us to easily set the shutdown status of the website and highly customize the display of shutdown prompt information.### Enable website shutdown feature When your website needs to be temporarily offline

2025-11-09

How to implement the 'Recommended Attribute' feature of AnQiCMS for displaying article categories on the front end (such as headlines, recommendations)?

AnQiCMS provides rich and flexible tools for the organization and display of website content, among which the "recommendation attribute" feature is a very practical design.It allows us to add special tags to articles for classification display on the website front end, such as highlighting 'headlines' articles or displaying 'recommended' content in specific areas. ### Understanding "Recommended Properties" The "Recommended Properties" in AnQiCMS essentially act as metadata tags for articles, used to describe the characteristics or importance of the articles.In the background content management interface, when you edit or publish an article

2025-11-09

How to format the article publish time in the template to display it in the specific format of 'Year-Month-Day'?

In website operations, a clear and unified time display format is crucial for improving user experience and content professionalism.Especially the publication time of the article, a standardized "year-month-date" format can make it clear to visitors.In AnQiCMS (AnQi CMS), achieving this is actually very simple and flexible.### Understanding AnQiCMS time handling method When using AnQiCMS, you will find that articles (`archive`) and products and other content all have two key time fields

2025-11-09

Does AnQiCMS support displaying a list of友情链接 links on the front end and distinguishing whether to add the nofollow attribute?

In website operation, friendship links are not only an important means to expand external resources and enhance website authority, but also the impact on search engine optimization (SEO) needs to be carefully managed.Many website managers are very concerned about whether the content management system they use can flexibly support the display of friendly links and provide control over the `nofollow` attribute to better balance SEO strategies and link collaboration needs.When building a website with AnQiCMS, you will be surprised to find out

2025-11-09

How to configure and manage the website's home page TDK (Title, Description, Keywords) to optimize search engine display?

What is the first impression of your website on search engines? Usually, it is TDK: Title (Title), Description (Description), and Keywords (Keywords).These seemingly simple pieces of information are, in fact, the key to search engines understanding the content of your website and deciding whether to display it to users.They are not only technical configurations, but also the precise extraction of the core value of your website, which directly affects the user's choice in a vast number of search results.AnQiCMS (AnQiCMS) is a content management system tailored for small and medium-sized enterprises and content operation teams

2025-11-09

How does AnQiCMS handle external links in content, is it retained directly or automatically added nofollow attribute?

In website operation, the management of external links is a detail that cannot be ignored. It not only relates to user experience but is also an important part of SEO strategy.We often ponder: When publishing content, how will AnQiCMS handle links to other websites included in the article?Is it simply to keep it as it is, or will it intelligently add the `nofollow` attribute, even directly remove these links?AnQiCMS provides a clear and powerful control strategy for handling external links in content

2025-11-09

How to implement batch management and classification of image resources in AnQiCMS for easy front-end calls?

In today's era where content is king, images, as an important carrier of information, directly affect the user experience and operation efficiency of the website through their management and call efficiency.For AnQiCMS users, batch management and flexible invocation of image resources are not difficult things.This system not only provides intuitive and convenient background operations, but also enhances the brilliance of image resources when presented on the front end through intelligent image processing and rich template tags.### Build a comprehensive image library: from batch upload to precise classification The richness of website content depends on a large amount of image materials, and how to organize these materials efficiently

2025-11-09