In the vast territory of AnQi CMS, the content model is undoubtedly one of its core charms, giving us the ability to flexibly define content structures according to business needs. When you use it in templates,moduleDetailWhen calling model data with a tag, you may have been accustomed to passing throughTitle(Model title) andName(Model name) to get basic information.But as a senior website operator, we know that efficient content operation often requires deeper data support.moduleDetailTags can provide you with which internal identification fields to make your website content display and operation strategy soar like a tiger.
Firstly, we need to clarifymoduleDetailThe positioning of tags: it aims to obtainthe content model itselfThe detailed information, rather than the subordinate of the modelSpecific documentUnderstanding this is crucial, as it helps us accurately utilize these identifiers
exceptTitleandNameThe most fundamental and equally important is,Model ID(Id).Each content model has a unique digital identifier within the system.Idwill be your best choice. For example, you can dynamically load different styles or scripts based on the model ID, providing a customized user experience for specific model pages.
Furthermore, we can also pass throughKeywordsto obtain the fieldthe keywords of the model.Although a single document may have its own keywords, keywords at the model level are often used to define the themes or core concepts of the entire content category.KeywordsThe field can give full play to its unique SEO value. It can help search engines better understand the macro themes of different content sections on your website, thus optimizing inclusion and ranking.
withKeywordsThat is complementaryModel introduction (Description).This field is usually used to provide a concise description of the content model, whether it is for the summary display on the model list page or as the Meta description information on the model home page, it can effectively enhance the efficiency of information communication.A meticulously written model introduction that not only attracts user clicks but also accurately conveys the core content of the model to search engines, further enhancing SEO effectiveness.
Furthermore,Model link (Link)It is also a very practical internal identifier.It can directly provide the access path to the home page of the content model.LinkThe field can ensure the accuracy and dynamics of the link. Even if the URL structure of the website is adjusted, as long as the model is configured correctly,LinkFields can be automatically updated, greatly reducing the cost and possibility of human maintenance errors.
For developers or operators who perform advanced customization,Model table name(TableName)It provides a deeper level of system information. Each content model corresponds to a table in the Anqi CMS database.TableNameThe field returns the name of this table.When performing complex data queries, custom report generation, or cross-module data integration, understanding the database table name corresponding to the model can help you write more accurate and efficient custom code.Although ordinary operation personnel may not use it directly, its importance at the system level is self-evident.
Finally, it is worth mentioning two parameters rather than direct fields, which indirectly broadenmoduleDetailthe calling ability:site ID (siteId)andmodel URL alias (token). Under the background of multi-site management supported by Anqicms,siteIdthe parameter allows you to call in the current site environment,other sitesSpecific model data, which provides great convenience for building a unified content pool or cross-site data display.tokenParameters allow you to obtain model details by using the model's URL alias (usually an abbreviation or pinyin), rather than its internal numeric ID.This is already included in the URL path, but it is especially flexible and convenient to avoid hardcoding the numeric ID.
In summary, of Anqi CMS'smoduleDetailThe internal identifier fields provided by the tag are far more than.TitleandNameBy skillfully using.Id/Keywords/Description/Link/TableNameand flexible utilizationsiteIdandtokenParameters, we can not only understand and control the expression form of the content model more deeply, but also bring a qualitative leap to the SEO optimization of the website, the improvement of user experience, and the operation efficiency.These seemingly minor fields are actually the foundation for building flexible, powerful, and highly customizable websites.
Frequently Asked Questions (FAQ)
Q1:moduleDetailCan tags get the value of custom fields? For example, I defined a field called 'author information' in the content model.
A1: moduleDetailTags are mainly used to obtain the system-level identifier of the content model itself (such as model ID, name, description, etc.), and it cannot directly obtain the one you set in the content model forDocumentDefine custom fields (such as the author of the article, product specifications, etc.). If you want to get these custom fields on the document detail page, you should usearchiveDetailtags, and cooperatename="您的自定义字段名"The way to call. The custom field definitions in the content model are for document instances, not the model itself.
Q2: In what situations should I usemoduleDetailofidThe parameter, and in what situation is it usedtokenThe parameter to specify the model?
A2: If you have clearly identified the unique numeric ID of a content model within the system, for example when performing some backend logic or internal data association, you can useidParameters are the most direct and efficient way. AndtokenParameters are more focused on locating the model through the model's URL alias. This is used to build dynamic paths in templates or when the URL already includes the model alias (such as/products/detail-product-name.htmlofproductsIt is very useful when you want to obtain model information in a more semantic way.Both can achieve the purpose of the specified model, the choice depends on the easiest way to obtain and the most natural recognition method in your current scenario.
Q3:moduleDetailprovidedLinkandTitleWhat is the different role of the field in SEO?
A3: LinkThe field directly provides the access URL of the content model, its main SEO role is to ensure the health and accuracy of the internal link structure of the website, and help the search engine spider smoothly crawl and index the homepage of the model. WhileTitleField as model title, it is more often used in Meta title tags (<title>) and the main title on the page (<h1>It serves the SEO function of directly conveying the page theme to users and search engines, affecting the title display in search results and the users' willingness to click.KeywordsandDescriptionThe field is forTitleThe supplement provides more detailed topic words and summaries, which together constitute the SEO basic information of the model page.