When using the `pageDetail` tag in a single page, when is the `siteId` parameter required?

Calendar 👁️ 64

In the daily operation of Anqi CMS, we often need to deal with various content display requirements and make use of the powerful template tags of the system to achieve these functions. Among them,pageDetailThe tag is a core tool for obtaining detailed content of a single page. A common issue when using this tag is:siteIdWhen should the parameter be set? To accurately answer this question, we need to deeply understand the multi-site management mechanism of Anqi CMS and the working principle of its template tags.

pageDetailLabel and default behavior

pageDetailThe main function of the tag is to obtain detailed information of a specific single page, such as the title, content, links, thumbnails, etc. In most cases, when we display the single-page content of a website itself, we usually use it in this way:{% pageDetail with name="Title" %}Or{% pageDetail with name="Content" id="1" %}.

Under the default usagepageDetailThe tag automatically identifies the context of the current website and retrieves the required single-page information from the data of the current website. Whether it is throughidSpecify a specific single page or let the tag automatically retrieve the single page corresponding to the current URL, the system will assume that you are querying the page data of the current active site. Therefore, when deploying on a single site or querying data for the current site,siteIdThe parameter is completely unnecessary to set.

Background and role of multi-site management

One of the core advantages of AnQi CMS lies in its powerful multi-site management capabilities.It allows users to create and independently manage multiple websites under the same system architecture, which is extremely convenient for enterprises and operation teams with multiple brands, sub-sites, or the need to integrate different content branches.Each site can have its own independent content, templates, settings, even databases (when deployed with Docker or with multiple database configurations), but they share the same safe CMS management backend.

The core value of multi-site management lies in: a unified platform, decentralized management.It reduces the complexity of deploying and maintaining multiple systems while also allowing each site to maintain the independence of its content.

siteIdThe real purpose of the parameter

siteIdThe parameter setting scenario is the key point of combining the AnQi CMS multi-site management function with template tags.

Only when you are in a multi-site AnQi CMS environment and need toNot currently an active siteWhen obtaining single page detail data,siteIdParameters become indispensable. In other words, if you are visiting site A, but your template needs to display a certain "About Us" page on site B (this is a single page), then you call it in the template of site ApageDetailWhen labeling, you need to explicitly specify the site B'ssiteId.

For example, if you want to display on the current sitesiteIdWith2The ID of another site is1Use the single page title like this:{% pageDetail with name="Title" id="1" siteId="2" %}. The system will use the one you providedsiteId, to retrieve the data of a specified single page across sites instead of from the current site (assuming itsiteIdis not 2)检索。

In summary,siteIdThe parameter is to achievecross-site content referencedesigned.It allows operation personnel to flexibly call and display specific single-page content managed by an AnQi CMS on another site within a site.siteIdParameter.


Frequently Asked Questions (FAQ)

1. I only have one secure CMS website,pageDetailTags need to be setsiteId?It is not necessary. If you have only one Anqi CMS website instance, or in a multi-site environment you always only query the content of the site being visited, thensiteIdThe parameter is not necessary, the system will automatically obtain data from the current site.

2. How to know about another website.siteIdare?On the AnQi CMS backend management interface, you can view the list of all sites created through the "Multi-site Management" feature. Each site usually has a unique identifier, including itssiteIdThis ID is a critical parameter used internally by the system to distinguish different sites.

3.siteIdThe parameter is only applicable topageDetailAm I supposed to use the label?Not.siteIdIs an Anqi CMS template tag parameter, it is commonly used for tags that need to specify the data source site, for examplearchiveDetail(Document Details),categoryDetail(Category Details),system(System settings),contact(Contact information) and various list tags such asarchiveList/pageListIt is used to implement cross-site data calls in a multi-site environment.

Related articles

How to batch regenerate the thumbnails of single page images?

As an operator who deeply understands the operation of AnQiCMS, I understand that in daily content management, the adjustment and optimization of image thumbnails are crucial for the beauty, loading speed, and user experience of the website.When the website design style changes, or to adapt to different device displays, we often need to uniformly adjust the size of the thumbnail images that have been published.AnQiCMS provides an efficient solution, allowing you to batch regenerate the thumbnail images of all the content on the site, including the images on the single page.###

2025-11-06

Does the image in the single page content support automatic conversion to Webp format?

As a professional deeply familiar with the operation of AnQiCMS, I fully understand the importance of website performance optimization for user experience and search engine performance.Images are an important component of web content, and their loading speed directly affects the overall performance of the website.About whether the images in the single-page content support automatic conversion to WebP format, Anqi CMS provides a clear and efficient solution.

2025-11-06

Will external links in single-page content be automatically filtered or added with nofollow tags?

As an expert in the operation of Anqing CMS, I know that every detail of content publishing can affect the SEO performance and user experience of the website.External links are an important part of the content, and their handling directly affects the authority transmission and risk control of the website.In Anqi CMS, how will external links in single-page content be handled, which is a focus for many operators.The AnQi CMS provides an automated and flexible mechanism for handling external links in content, mainly through the unified management of the "Content Settings" feature in the backend.

2025-11-06

Does the URL alias of a single page support the automatic generation of Chinese pinyin?

As an experienced AnQi CMS website operation person, I fully understand your concern about the website URL structure, especially whether the single-page URL alias can automatically generate pinyin in Chinese.This not only concerns the SEO performance of the website, but also directly affects the user experience and content management efficiency.Based on my in-depth understanding of the AnQiCMS system and the system documentation you provided, I can clearly tell you that the single-page URL alias function of AnQiCMS supports the automatic generation of pinyin in Chinese.

2025-11-06

How can you integrate traffic statistics or spider monitoring functions into a single page?

As an experienced website operator familiar with AnQi CMS, I fully understand your need to integrate traffic statistics or crawler monitoring functions into a single page.This can not only help you understand the page performance more intuitively, but also display data to visitors in specific scenarios.The Anqi CMS itself provides powerful background data statistics functions, but to display these data on the front-end single-page, it requires some specific methods.

2025-11-06

Does AnQi CMS support content scheduling for page management?

As a website operator who deeply understands the operation of AnQiCMS, I understand your emphasis on content publishing efficiency and strategy.In response to your question about whether the Anqi CMS page management function supports scheduled content publishing, I can provide you with a detailed explanation.The Anqi CMS has fully considered the flexibility and automation requirements of content publishing in its core functional design.By thoroughly analyzing the provided documents, we can confirm that Anqi CMS indeed has the ability to schedule content publishing, but its application scope needs to be treated specifically.

2025-11-06

How to configure the backup and recovery strategy for a single page?

As an experienced CMS website operation person in the security field, I am well aware of the importance of data security for any website, especially for single-page content carrying key information.Under the architecture of AnQi CMS, the content, layout, media files, and related configurations of a single page all constitute an indispensable part of the website.Therefore, configuring a comprehensive backup and recovery strategy is the cornerstone of ensuring the continuous stable operation of a website and dealing with various risks (such as accidental operations, server failures, malicious attacks, etc.).Although AnQi CMS mentioned "resource storage and backup management" in the project advantages

2025-11-06

Does the single-page support integration with third-party comment systems?

The AnQi CMS offers a powerful and flexible solution in content management, committed to meeting the diverse needs of users.This question of whether the single-page supports integration with third-party comment systems can be explored from two perspectives: the built-in functions of AnQiCMS and the flexibility of its template system.The AnQiCMS system itself indeed has a comprehensive comment management feature.

2025-11-06