How to get the complete content, SEO information, and associated images of a single page?

Calendar 👁️ 73

In daily website operations, independent pages such as "About Us", "Contact Information", etc., bear the important responsibility of conveying core information and shaping the brand image.As content operators, we often need to gain a deep understanding of the structure of these pages, including their main content, SEO information, and all related image resources, in order to carry out fine management, optimization iteration, or flexible page layout.AnQiCMS provides a straightforward and powerful template tag system, making it easy to retrieve these page data.

Basic understanding of standalone pages in Anqi CMS

In the Anqi CMS backend, independent pages are usually created and maintained under 'Page Resources' in 'Page Management'.Different from articles, products, and other types that need to follow specific content models, independent pages are more focused on displaying unique, static, or relatively fixed information.To obtain detailed data for these independent pages, we mainly use the Anqi CMS template engine providedpageDetailThe tag is the core entry point to obtain all relevant information of an independent page. We can obtain the various components of the page by specifying parameters.

In-depth acquisition of the core content of an independent page

The core of an independent page lies in its main content, usually a combination of carefully written text, images, and multimedia. In the Anqi CMS template, we can usepageDetailtags, and specifyname="Content"Parameter.

For example, in your template file, you might see the following code:

{% pageDetail pageContent with name="Content" %}
{{ pageContent|safe }}

This line of code first goes throughpageDetailThe tag to get the main content of the current independent page and assign it to a variable namedpageContentThe variable is followed by.{{ pageContent|safe }}This content will be output.|safeThe filter plays an important role here, it tells the template engine,pageContentThe content within the variable is carefully designed and verified HTML code that can be directly parsed and displayed on the page without escaping, which is crucial for displaying rich text editor edited content.

If you need to get the content of an independent page with a specific ID or URL alias, rather than the page you are currently visiting, just inpageDetailthe tag withidortokenthe parameter, such as:{% pageDetail pageContent with name="Content" id="10" %}This will retrieve the content of the independent page with ID 10.

Mining SEO information of the independent page.

For any page that hopes to perform well in search engines, SEO information is indispensable. Anqi CMS provides a comprehensive SEO field setting for independent pages, and we can easily obtain them through template tags:

  1. Page Title (Title)This is one of the most important elements in the search engine results page (SERP). You can usetdktags to get the page title:{% tdk with name="Title" %}. This tag can intelligently organize the title according to the type of the current page (including standalone pages) and optionally add a website name suffix, such as{% tdk with name="Title" siteName=true %}. If you only need the title set on the independent page itself, you can also use{% pageDetail with name="Title" %}.

  2. Page Keywords (Keywords)However, keywords are still an important hint for the page theme in modern SEO, despite their decreased weight.{% tdk with name="Keywords" %}You can get the keywords for the independent page settings by doing so.

  3. Page Description (Description)This is a brief text that usually appears as a summary of the page content in search engine results, and is a key factor in attracting users to click. You can use{% tdk with name="Description" %}or{% pageDetail with name="Description" %}to obtain the description information of the page.

  4. Standard Link (Canonical URL)When there are multiple URL access paths for content, setting a standard link can prevent search engines from treating it as duplicate content.tdkTags also support retrieval:

    {%- tdk canonical with name="CanonicalUrl" %}
    {%- if canonical %}
    <link rel="canonical" href="{{canonical}}" />
    {%- endif %}
    

    This code will first try to obtain the specification link, if it exists, then it will output it as<link rel="canonical">the tag to the page<head>Section.

and properly place these SEO-related information on the page<head>An area that can significantly improve the performance of an independent page in search engines.

Capture visual elements: processing associated images.

The image on the page is an important element that attracts users and enhances the readability of the content. Anqi CMS allows us to configure multiple types of images for independent pages and provides flexible access methods:

  1. Page thumbnail or LogoEach independent page can specify a representative image as its thumbnail or Logo. You can{% pageDetail with name="Logo" %}or{% pageDetail with name="Thumb" %}to get the URLs of these images.

  2. Slideshow or galleryWhen an independent page needs to display a set of images (for example, "corporate album" or "product carousel"),pageDetaillabel'sname="Images"The parameter comes into play. It returns an array containing all image URLs, and you can use loop tags to display them one by one: “`twig {% pageDetail pageImages with name=“Images” %} {% for imgUrl in pageImages %}Independent page image{% endfor %}

Related articles

How to get and loop through all independent pages in AnQiCMS template (such as About Us)?

In AnQi CMS, sometimes we need to list some independent pages in the website's navigation bar, footer, or other specific areas, such as "About Us", "Contact Us", "Privacy Policy", and so on.These pages usually contain fixed content and do not belong to a specific category or article model. AnQiCMS refers to them as 'single pages'.Fortunately, AnQiCMS provides a very intuitive and powerful template tag that can easily retrieve and loop through information for these single pages.### Core Tag

2025-11-08

How to display the main category in the navigation bar and show the latest products under this category in the dropdown menu?

In website operation, a clear and effective navigation system is the key to improving user experience and website professionalism.AnQiCMS (AnQiCMS) with its flexible content management and powerful template engine, can help us easily achieve complex navigation requirements.Today, let's discuss how to display the main categories in the website's navigation bar and also show the latest products under the category in a dropdown menu when the mouse hovers over it.### One, Understand the navigation and content management basics of AnQiCMS One of the core advantages of AnQiCMS lies in its modular content management system

2025-11-08

How to implement a multi-level nested tree structure display in the category list?

When building website categories, we often need to display a clear, hierarchical structure so that users can intuitively understand the ownership of the website content.AnQiCMS provides powerful template tag features, fully supporting the display of multi-level nested tree structures in category lists, helping you easily create a user-friendly navigation system.The core of achieving this effect lies in the clever use of the `categoryList` template tag of Anqi CMS and its built-in hierarchical judgment function.By looping in the template, you can use the parent-child relationship of the category

2025-11-08

How to retrieve and display detailed information of a specified category, including its description, Banner image, and Logo?

In a content management system, categories are not only the form of content organization, but also the core of website structure and user navigation.Flexibly obtain and display detailed information of a specific category, such as its description, unique banner image and logo, which is crucial for creating attractive and informative pages.AnQiCMS (AnQiCMS) provides an intuitive and powerful template tag to meet this need, allowing you to easily achieve this requirement.### Core Function Tag

2025-11-08

How to retrieve and loop the list of friend links in the AnQiCMS template?

In website operation, friendship links are an important means to enhance website authority, increase external traffic, and promote cooperative relations.A convenient management and flexible display of友情链接 function is crucial for any content management system.AnQiCMS as an efficient content management system provides an intuitive way to manage and obtain the list of friend links in templates.This article will thoroughly introduce how to obtain and loop through the list of friendship links on AnQiCMS templates, helping you easily realize the interconnection of websites.

2025-11-08

How to retrieve and display the list of Banner carousel images configured on the website homepage?

In Anqi CMS, the Banner slideshow on the homepage is an important element to attract visitors' attention and display core content.Correctly obtain and display these banner images, which can greatly enhance the visual effects and user experience of the website.Anqi CMS provides intuitive functions and flexible template tags, allowing us to easily achieve this goal. ### First Step: Configure Your Banner Carousel in the Backend Before starting to display the Banner on the website frontend, we first need to configure it in the Anqi CMS backend management system. Typically

2025-11-08

How to display a list of articles with pagination and customize the style and number of pagination navigation pages?

Today, with the increasing richness of website content, how to efficiently display a large number of articles while ensuring a smooth browsing experience is a problem that every website operator needs to consider.AnQiCMS (AnQiCMS) provides a powerful and flexible article list pagination feature, which not only helps to optimize the content presentation of the website, but also allows for better integration into the overall website design through custom styles and page number settings, enhancing the user interaction experience.Next, we will delve into how to implement pagination of the article list in Anqi CMS

2025-11-08

How to dynamically add a website name suffix or custom delimiter in the page title (Title)?

The page title (Title) is the 'front door' of a website on the search engine results page. It not only can intuitively tell users the content of the page, but it is also an important indicator for search engines to evaluate the relevance and authority of the page.An optimized page title that can significantly improve click-through rates and the website's search engine ranking.In AnQiCMS, you can flexibly control the way page titles are generated, especially by dynamically adding the website name suffix and custom delimiters to achieve a unified brand image and better SEO effect.### AnQiCMS in TDK

2025-11-08