How to set custom title attributes ( `title `) for the home and end page links in AnQiCMS?

Calendar 👁️ 63

AnQiCMS (AnQiCMS) as an efficient and flexible content management system, while providing powerful functions, also pays attention to many details in website operations, such as links oftitleProperty settings.titleAlthough the attribute is not directly visible on the page, it plays a "touch of color" role in improving user experience, assisting search engines in understanding link content, and enhancing website accessibility.It can provide additional information to visitors hovering over the mouse, and also provides navigation context to screen reader users.

Today, let's delve into how to cleverly set custom links for the homepage and endpage in AnQiCMS.titleAttribute, let your website show professionalism in detail.

Understand the link data structure in AnQiCMS

In AnQiCMS, whether it is a navigation menu created through the backend or a list generated dynamically through tags, the system will maintain a set of structured data for each linkable entity (such as articles, products, categories, single pages, etc.). This data usually includes a link address (LinkDisplay textTitleDescription informationDescriptionAnd some other related attributes (such as the image'sAltText). It is these built-in data fields that allow us to flexibly customize the linkstitleProperties provide a solid foundation.

Navigation links at the home and end pages.titleProperty customization

The homepage and footer often carry the most important navigation structure and core content entry of a website. In AnQiCMS, these navigation links are usually managed through the "website navigation settings" feature and throughnavListTemplate tags are rendered on the front end.

Backend configuration: Assign a 'description' to the navigation link.

Firstly, we need to add the corresponding description information for the navigation link in the AnQiCMS backend. Enter.“Back-end Settings” -> “Website Navigation Settings”. Here, you will see various navigation categories you have created, such as “Default Navigation” or the custom “Footer Navigation”.

Click to edit a specific navigation link, and you will find a field named 'Navigation Description' here. This is where you set your linktitleThe position of the attribute. For example, if your navigation item is 'About Us', you can fill in 'Learn about the mission and vision of Anqi CMS' in the 'Navigation Description', or 'View our team and development history'.These descriptions will be displayed as tool tips when the mouse hovers over them, enhancing user experience and providing richer context for search engines.

Template Implementation: Smart UsenavListTag

In your front-end template file (usually the homepage templateindex.htmlor public headerpartial/header.html, public footerpartial/footer.html), you may have usednavListtag to render the navigation menu.

navListA tag will return an array containing multipleitem) with eachitemcarryingTitle(Display name),Link(link addresses) as well as the keyDescription(Navigation description). In the template, we can do it like this toitem.Descriptionbind the value dynamically to the link'stitleattribute:

{# 示例:渲染主导航菜单 #}
{% navList navs with typeId=1 %}
    <ul>
        {%- for item in navs %}
            <li>
                <a href="{{ item.Link }}" title="{{ item.Description }}">{{ item.Title }}</a>
                {# 如果存在子导航,这里可以继续循环 inner.NavList #}
                {%- if item.NavList %}
                <dl>
                    {%- for inner in item.NavList %}
                        <dd>
                            <a href="{{ inner.Link }}" title="{{ inner.Description }}">{{ inner.Title }}</a>
                        </dd>
                    {% endfor %}
                </dl>
                {% endif %}
            </li>
        {% endfor %}
    </ul>
{% endnavList %}

{# 示例:渲染页脚导航(假设你有一个typeId=2的页脚导航) #}
{% navList footerNavs with typeId=2 %}
    <ul class="footer-links">
        {% for item in footerNavs %}
            <li><a href="{{ item.Link }}" title="{{ item.Description }}">{{ item.Title }}</a></li>
        {% endfor %}
    </ul>
{% endnavList %}

In this way, the navigation description configured on the back-end will elegantly appear in the front-end linktitlethe attribute.

Linked to dynamic contenttitleProperty customization

In addition to fixed navigation links, the homepage and footer often display the latest articles, popular products, friendship links, or brand partners, and other dynamic content. This content is usually througharchiveList/pageList/linkList/bannerListTag dynamic call.

Content management: enrich the description of links.

For articles, products, single pages, categories, tags, and other content, AnQiCMS usually provides fields such as "Document Description" (Description), "SEO Title" (SeoTitle), or "Tag Description" in the background editing interface. For image link types (such as Banner), there will beAltText field. These can be used to fill in linkstitleValuable resources of properties

  • Article/Product/Single page:When editing a document or page, be sure to carefully fill in the "Document Summary" or "SEO Title" in addition to filling in the title.
  • Categories/Tags:When creating or editing a category/label, fill in the "category profile" or "label description".
  • Friendship Links:Under the function management, each link in the "Friendship Link" has a "Link Name" and a "Link Note", the latter is a good place to settitleproperties.
  • Home page Banner:In image resources or specific Banner management, the image'sAlttext and description fields can be used astitlethe source of the attribute.

Template implementation: Apply properties in a loopitemof the attribute

When you usearchiveList/pageListorlinkListWhen a label loop displays content, each loop item (item) contains its own

Related articles

Can the `pages.Pages` array's `Name` field be customized to display other text besides numbers?

In AnQiCMS (AnQiCMS) daily operations and template design, we often encounter questions about the flexibility of content display.One of the very specific and frequently mentioned questions is: Whether the `Name` field in the `pages.Pages` array can be customized to display other text besides numbers?As an experienced website operation expert, I will combine the features and content operation strategies of AnQiCMS to deeply interpret this issue for everyone.--- ### Explanation of AnQiCMS pagination page numbers: `pages

2025-11-07

How to implement pagination navigation in AnQiCMS only when the page number exceeds X?

The Anqi CMS is an efficient and customizable enterprise-level content management system that provides great flexibility in content display.For website operators, how to intelligently manage and present page content, ensuring that users get **experience** while also considering SEO friendliness, is a fine issue that needs to be considered in daily work.Today, let's delve into a common requirement: how to implement pagination navigation in AnQiCMS only when the page number exceeds a certain threshold (X)?### Understanding AnQiCMS pagination mechanism In AnQiCMS

2025-11-07

Does AnQiCMS's pagination tag provide hooks or events for frontend JavaScript interaction?

## AnQiCMS Page Tag Interaction with Front-end JavaScript in Depth Analysis As an experienced website operation expert, I am well aware that the smoothness of front-end interaction is crucial for user experience in modern web design.Especially for common UI elements like pagination, users often expect a seamless loading experience rather than page refresh with each click.AnQiCMS (AnQiCMS) is an efficient content management system based on the Go language, with unique features in its template mechanism and tag usage. Today

2025-11-07

Security CMS pagination navigation: easily achieve 'Total X pages' and 'Current page Y' intelligent display

As an experienced website operations expert, I know the importance of a smooth, complete pagination navigation for user experience and search engine optimization (SEO).AnQiCMS (AnQiCMS) provides us with powerful content management capabilities with its high-performance architecture based on the Go language, flexible template engine, and SEO-friendly design concept.Today, let's delve into how to巧妙地 display key information such as "Total X pages" and "Current page Y" in the pagination navigation of AnQiCMS, making the content of the website more professional and intelligent.

2025-11-07

Does the pagination label automatically handle the `_page` parameter in the URL?

In the world of website operation, content pagination is an indispensable part.It not only optimizes page loading speed and improves user experience, but is also an important part of search engine optimization (SEO) strategy.When discussing an enterprise-level content management system like AnQiCMS, a common and critical issue is how does it handle pagination tags in URL pagination parameters, such as the `_page` parameter we often see?Today, let's delve deep into the performance of AnQi CMS in this aspect.### Enterprise CMS Pagination Tag

2025-11-07

If `archiveList` returns data less than `limit`, will the `pagination` tag still be displayed?

As an experienced website operation expert, I have a deep understanding of AnQiCMS (AnQiCMS) and often encounter users who have questions about the behavior of certain tags during template development.TodayThis issue concerns the elegance of page layout, the smoothness of user experience, and potential SEO optimization

2025-11-07

How to implement a feature similar to 'jump to page X' input box in AnQiCMS template?

As an experienced website operations expert, I know how common it is for users to need to quickly locate a specific page while browsing a large list of content.Especially in a high-efficiency and flexible content management system like AnQiCMS, it provides users with a convenient navigation experience, which can significantly improve the usability and user satisfaction of the website.Today, let's delve into how to cleverly implement a function similar to 'jump to page X' in the AnQiCMS template.

2025-11-07

Is the pagination tag considering the `BaseUrl` and `MobileUrl` settings of the website when generating URLs?

As an expert in website operation for many years, I know the importance of URL structure for website SEO and user experience.In a system like AnQiCMS, which emphasizes efficiency and optimization, how does its internal mechanism handle these fundamental and critical configurations, which is a concern for many operators.Today, let's delve into whether the pagination tag considers the `BaseUrl` and `MobileUrl` settings of the website when generating URLs?This topic.

2025-11-07