Anqi CMS Template Tag Manual
-
System settings label
Instructions: Used to obtain system configuration information. Usage: {% system variable_name with name="field_name" %}, the variable name is not required. After setting the variable name, it can be called by the variable name later. If the variable name is not set, it will output the result directly. The available field names for the name parameter are: Website Name SiteName Website Logo SiteLogo Website -
Contact Information Tag
Instructions: Used to obtain contact information configured on the back-end. Usage: {% contact variable_name with name="field_name" %}, the variable name is not required. After setting the variable name, it can be called later through the variable name. If the variable name is not set, the result is output directly. The available field names for the name parameter are: contact person, UserName, phone number, Cellpho -
TDK Tag
Instructions: Used to obtain the page title, keywords, and description information. Usage: {% tdk variable name with name="field name" %}, the variable name is not required. After setting the variable name, it can be called by the variable name later. If the variable name is not set, the result is output directly. The available field names for the name parameter are: page title Tit -
Navigation List Tag
Instructions: Used to obtain the page navigation list usage method: {% navList variable name %} For example, if the variable is defined as navs {% navList navs %}...{% endnavList %}, it can also be defined with other variable names. After the definition, it needs to be consistent with the variable name used in the following for loop.navList tag has no parameters, use e instead -
Category List Label
Description: Used to get the list of articles and product categories. Usage: {% categoryList variableName with type="1|2" parentId="0" %} If the variable is defined as categories {% categoryList categories with type="1" parentId="0" %}. -
Category Details Label
Description: Used to get the article category, product category details Usage: {% categoryDetail variableName with name="field name" id="1" %} Variable name is not required. After setting the variable name, it can be called later through the variable name. If the variable name is not set, the result is output directly. The categoryDetail supports parameters such as: id, id is not -
Document List Tags
Description: Used to obtain the document list, related document list, and document pagination list. Usage: {% archiveList variableName with categoryId="1" order="id desc|views desc" type="page|list" q="search keywords" %} If the variable is defined as archives {% a -
Document/Product Details Tag
Description: Used to retrieve document detail data Usage: {% archiveDetail variableName with name="fieldName" id="1" %} Variable name is not required. If a variable name is set, it can be called later through the variable name. If no variable name is set, the result is output directly. The parameters supported by archiveDetail are: Document ID idid is not required. -
Document Tag List Label
Explain: After we tag various tags on the document, we can call these tags using the document Tag list tag.Usage: {% tagList variableName with limit="10" %} As defined by the variable tags {% tagList tags with limit="10" %}...{% endtagList %}tag -
Tag Document List Label
Description: Used to retrieve the document list for a specified Tag. Usage: {% tagDataList variableName with tagId="1" %} If the variable is defined as archives {% tagDataList archives with tagId="1" %}...{% endtagDataList %}tagDataLi -
Single Page List Label
Description: Used to retrieve the list of single pages. Usage: {% pageList variableName %} For example, if the variable is defined as pages {% pageList pages %}...{% endpageList %} The pageList does not support parameters, so this tag will retrieve all pages.If you need to exclude certain pages, you can remove the ones you don't need in the subsequent for loop -
Single Page Details Label
Description: Used to get single page detail data Usage: {% pageDetail variableName with name="fieldName" id="1" %} Variable name is not required. If variable name is set, it can be called later through variable name. If variable name is not set, it will output the result directly. pageDetail supports parameters such as: id, id is not required, the default will get the current single -
Comment List Label
Description: Used to get the document comment list, comment pagination list Usage method: {% commentList variableName with archiveId="1" type="page|list" %} If the variable is defined as comments {% commentList comments with archiveId="1" type= -
Message Form Label
Instructions: Used to obtain the background settings of the guestbook form usage method: {% guestbook variable name %} such as defining the variable as fields {% guestbook fields %}...{% endguestbook %} This tag does not support parameters.fields is an array object, therefore you need to use a for loop to output item as for loop -
Breadcrumb Navigation Tag
Instructions: Used to obtain the breadcrumb navigation list usage method: {% breadcrumb variable name with index="home" %} If the variable is defined as crumbs {% breadcrumb crumbs with index="home" %}...{% endbreadcrumb -
Previous Document Tag
Instructions: Used to obtain the usage method of the previous document data: {% prevArchive variable name %} If the variable is defined as prev {% prevArchive prev %}...{% endprevArchive %} prevArchive does not support parameters.prevArchive supports the following fields: document ID Id document title T -
Next Document Tag
Instructions: Used to obtain the usage method of the next document data: {% nextArchive variable name %} If the variable is defined as next, it is used as follows: {% nextArchive next %}...{% endnextArchive %}nextArchive does not support parameters.nextArchive supports the following fields: Document ID Id Document Title T -
Tag Details Label
Instructions: Used to obtain the tag detail data of the document. Usage: {% tagDetail variableName with name="field Name" id="1" %}Variable name is not required. If a variable name is set, it can be called later using the variable name. If no variable name is set, the result is output directly.The tagDetail supports parameters: TagID id.The id is not required, default -
Count code tags
360/Toutiao and others JS automatically submit JS code call tag:{{- pluginJsCode|safe }} -
related document tag
Description: Retrieve related documents of the current document. The logic of related documents is: retrieve adjacent documents of the same category based on the document ID of the current document.Therefore, this tag can only be used on the document detail page. Usage: {% archiveList variableName with type="related" limit="10" %} If the variable is defined as archives {% archiveL -
Other auxiliary labels
Some commonly used built-in tags. The nested reference to include is often used when making templates. We will extract some common parts, such as header, footer, and aside, and store them independently. There is no need to repeat the writing on each page, just need to include them on each page.At this time, we can use the include tag.{% include "par" -
Pagination Label
Instructions: Used to obtain pagination information for article lists, product lists. Usage: {% pagination variable_name with show="5" %} If the variable is defined as pages {% pagination pages with show="5" %}...{% endpagination %} pagination supports one -
document parameter tag
Instructions: Used to obtain the parameter usage method of the backend settings for a specified document: {% archiveParams variableName with id="1" sorted=true %} If the variable is defined as params {% archiveParams params with id="1" sorted=true %} ...{% endarc %} -
document parameter filter tag
The document parameter filter can only be used on the document homepage or document category template, combined with the document pagination list.Explain: It is used to create filtering conditions based on various parameters of the document, such as when creating a real estate website, you can filter according to house types such as residential, commercial, residential-commercial, and so on, and at the same time, you can also filter according to the size of the house such as single room, one bedroom living room, two bedrooms living room, three bedrooms living room, and so on. In this case, you can use the document parameter filtering function. Enabling -
Friendship Links Label
Instructions: Used to obtain the friend link list. Usage: {% linkList variableName %} For example, if the variable is defined as friendLinks {% linkList friendLinks %}...{% endlinkList %}linkList does not support parameters, it will retrieve all friend links.friendLinks is an array object -
More filters
When outputting variables, it also supports using filters to perform initial data filtering, the format is: {{obj|filter__name:param}} For example, a variable, when it has a value, will output the current value, and when it has no value, it will output the default value: Use default to set the default value: {{ userName|default:"Anonymous Hero"}} default is empty -
General label - Variable definition and assignment label
iris.Django template engine's template parser provides a method called with that allows declaring and using variables in the template.With we can temporarily declare one or more variables for subsequent use.In most cases, we will use it with the include tag.As: {% with title="This is the title declared for the header" keywords="This is the keyword" -
Formatted timestamp label
In the template, it supports directly formatting timestamps into specified formatted output.Label keyword: stampToDate. Usage: {{stampToDate(timestamp, "format")}}.A timestamp of 10 digits, such as 1609470335, in the format supported by Golang.Example: {% set publishStamp = 160947033 -
General Label - for loop traversal label
for used to iterate over each item in an array, making the item available in the context variable.For example, to display the article list provided by articleList: {% for item in articles %} <ul class="item"> <a href="/article/{{item.Id}}" class="li" -
General label - Remove logic label occupied line
This requirement is often used, such as in if-elseif or for loops, it will even output the blank lines of the if-else label part. If you want to clean up the blank lines, you can use - before or after the label to filter, such as: {%- if false %} 1st choice {%- elif false %} 2nd choice -
General label - Arithmetic operation label
In the template, use mathematical arithmetic to calculate integer and complex expressions {{ 10-100 }} {{ -(10-100) }} {{ -(-(10-100)) }} {{ -1 * (-(-(10-100))) }} {{ -1 * (-(-(10-100))) -
General Label - if logical judgment label
The value of the label judgment expression, if the value of the expression is true, then execute its main content.How to use: {% if condition %} ... {% endif %}, {% if condition %} ... {% elif other conditions %} ... {% endif %}, {% if condition %} ... {% elif other conditions %} -
Message Verification Code Label
Message Verification Code Label -
Determine if the text, array contains a specified keyword
How to judge whether a line of text string contains a certain keyword in AnQi CMS template?The contain filter can determine if a keyword is included in a line of string, array (slice), key-value pair (map), or structure (struct), and the result will return a boolean value (bool).How to use the contain filter: {{obj|contain:keyword -
Remove all leading and trailing spaces and specific characters from a string
How to remove leading and trailing spaces or specific characters from a string in the AnQi CMS template?The trim, trimLeft, trimRight filters can respectively remove spaces at the beginning and end of a string, or specific characters.The trim filter can remove whitespace or specific characters from the beginning and end of a string;The trimLeft filter can remove leading spaces or specific characters from a string;The trimRight filter can remove strings -
Count the occurrences of a specific keyword in a line string and in an array
How to calculate the number of times a keyword appears in a string or array in AnQi CMS template?The count filter can calculate the number of times a keyword appears in a string or array (array/slice).How to use the count filter: {{obj|count:keyword}} For example, calculate the occurrence of CMS in Welcome to AnQiCMS (AnQiCMS) -
Filter: Split a line of text into an array by spaces
How to split a line of text into an array in Anqi CMS template?The fields filter can split a line of text into an array in the template.The defined array is a []string{}, it can be traversed and outputted later.Usage of the fields filter: {% set values = "text content"|fields %} {% set v -
Get the position of a keyword in a line string or array
How to get the position of a keyword in a string or array in Anqi CMS template?The index filter can calculate the position of a keyword in a line of string or array (array/slice).If a string contains multiple keywords to be searched, then index returns the position of the first occurrence.If not found, return -1. Note: when calculating the position of the string, if there is Chinese in the string, -
Define an array in a template
How to define an array in Anqi CMS template? The list filter can define an array in the template.The defined array is a []string{}, it can be traversed and outputted later.Usage of list filter: {% set values = '["keyword1","keyword2","keyword3"]'|list %} Use single or double quotes for the string to be converted -
Replace a specific keyword in a string with another keyword
How to replace a word in a string in Anqi CMS template?The replace filter can replace the old word with the new word in a string and return the new string.If old is empty, it will match at the beginning of the string and after each UTF-8 sequence.If new is empty, remove old. Usage of replace filter: # Replace the old -
Repeat a string multiple times
How to repeat a string a specified number of times in Anqi CMS template?The repeat filter can repeat a string a specified number of times.How to use the repeat filter: {{obj|repeat:times}} For example, to repeat "AnQiCMS" 5 times, you can write: {{"AnQiCMS"|repeat:5}} # Display result AnQiCMSAnQiCMS -
Generate random text
The lorem tag can generate random text content of specified length.Generally used for typesetting needs. Usage: {% lorem quantity method random %} The quantity can be calculated by the number of characters or words, depending on the method.The method is one of the following: 'w', 'p' or 'b'.random for whether random, default not filled, fill in random and it will be random -
Add numbers or strings
Filter: Add numbers or strings -
Add a backslash before predefined characters
How do I add a backslash before predefined characters in a string in AnQi CMS template?The addslashes filter adds a backslash before predefined characters.These characters are single quotes (') and double quotes (") and backslashes (\).How to use the addslashes filter: {{ obj|addslashes }} For example, to escape the predefined characters in 安企\"CMS\" -
Convert English string characters to uppercase or lowercase
How to convert English string letters to uppercase or lowercase in AnQi CMS template?The capfirst filter can capitalize the first letter of an English string.Only alphabetic characters will be converted. The lower filter can convert all letters in a string to lowercase.The upper filter can convert all letters in a string to uppercase.title The filter can remove all the words from the English string -
Display the string centered, left-aligned, or right-aligned according to a specified length
How to display a string centered, left-aligned, or right-aligned in a specified length in AnQi CMS template?The center filter can display strings centered according to a specified length.If the length of the string is greater than the specified length, it will be displayed according to the actual length of the string. If the length of the string is less than the specified length, an equal number of spaces will be added on both sides of the string to achieve centering.If the number of spaces to be added is odd, then the spaces on the right will be more than -
Remove the specified character from any position in the string
How to remove a specified character from a string at any position in the Anqi CMS template?The cut filter can remove specified characters from any position in a string.As removing special characters, spaces, and other operations, all can use the cut filter method: The usage method of the cut filter: {{ obj|cut:"keyword" }} For example, to remove the letter s from test, it can be written like this: {{ "test"|cu -
Display time value in a specified format
How to display time values in a specified format in Anqi CMS template?The date filter can display time values in a specified format.But note that the input of date must be a time.Time value, otherwise it cannot be processed and an error will occur.The output format is set according to the Golang time format.You can also use time, it has the same usage and result as date.It is the alias of date -
Set default values for numbers, strings, or objects
How to set default values for numbers or strings, objects if they do not have values in AnQi CMS template?The default filter can set a default value for numbers or strings if a number or string, or an object does not have a value.The default_if_none filter can determine if a pointer type object is empty, and if it is empty, it sets a default value.How to use the default filter method: { -
Determine if a number can be used as a divisor
How to judge whether a number or its calculation result can be used as a divisor in the Anqi CMS template?The divisibleby filter can determine if a number or its calculation result can be used as a divisor.The filter will return a boolean value (bool), True means yes, False means no.The usage of the divisibleby filter: {{ number| -
Escape special characters in strings and JavaScript code
How to escape special characters such as HTML code in strings and JavaScript code in AnQi CMS templates?The escape filter can escape special characters in a string.For example, output HTML code for display instead of parsing HTML code.As for, &,' and "., it will be converted to >., & will be converted to &amp;, " will be converted to ", ' will be converted to '. Also can make -
Split a line of text into an array by spaces
How to split a line of text into an array in Anqi CMS template?The fields filter can split a line of text into an array in the template.The defined array is a []string{}, it can be traversed and outputted later.Usage of the fields filter: {% set values = "text content"|fields %} {% set v -
The first or last value of a string or array
How to get the first or last value of a string or array in Anqi CMS template?The first filter can get the first character of a string or the first value of an array.If the original string or array is empty, do not return anything. If the string is Chinese, return the first Chinese character.The last filter can get the last character of a string or the last value of an array.If the original string or array is empty, do not return anything. If the string is -
Keep floating-point numbers to a certain number of decimal places
How to output a floating-point number with 2 decimal places in AnQi CMS template?The floatformat filter can output a floating-point number with 2 decimal places.Also, you can retain decimal points with specified digits. For example, retaining 3 decimal places, etc.Supports negative number of digits, if a negative number is set, it calculates from the last digit upwards.The usage of floatformat filter: {{ obj|float -
Get the specified position of the number in the number
How to get a number at a specified position in an Anqi CMS template?The get_digit filter can obtain the digit at a specified position in a number, with the position counted from the end of the number, starting from 1.If the position to be obtained does not exist, return the entire number.If the original number is a number, then the result obtained is the number obtained by subtracting 48 from the ASCII value of the character at that position.Use method get_digit -
Convert a numeric string to a float or integer
How to convert a numeric string to a floating-point number or integer in AnQi CMS template?The float filter can convert a numeric string to a floating-point number.If the conversion fails, it will return 0.0. The integer filter can convert a string to an integer.If the conversion fails, return 0. Usage method of float filter: {{ obj|float }} Usage method of integer filter: -
Concatenate an array into a string with a specified separator
How to concatenate an array into a string with a specified delimiter in Anqi CMS template?The join filter can concatenate the values of an array into a new string with a specified separator.If the original object is a string, it will directly concatenate the characters with a concatenation symbol.How to use the join filter: {{ obj|join:":delimiter" }} For example, you need to join ["splits", "the -
Get the length of a string, array, or key-value pair
How to get the length of a string, array, and key-value pair in Anqi CMS template?The length filter can get the length of strings, arrays, and key-value pairs.For a string, it calculates the actual character count of utf8, one letter is one, and one Chinese character is also one.The array and key-value pairs can be used to calculate their index count. You can also use length_is to calculate the length while comparing it with the input length and -
Convert multiline text to HTML tags with line breaks
How to convert multiline text to HTML tags in the Anqi CMS template?The linebreaks filter can convert multi-line text to HTML tags by line breaks.Enclosed with and at the beginning and end of each line, use . for empty lines.You can still use linebreaksbr to process it.The difference with linebreaks is that linebreaksbr simply converts line breaks -
Convert letters on the mobile phone keypad to numbers
How to convert letters on the mobile phone number keypad to numbers in AnQi CMS template?The phone2numeric filter can convert letters on the phone number keypad to numbers.Conversion relationship is: { "a": "2", "b": "2", "c": "2", "d": "3", "e": "3", "f": "3", "g": "4", "h": "4", "i -
Plural form of a word
How to convert a word to plural form based on quantity in AnQi CMS template?The pluralize filter can convert a word to its plural form based on the quantity.The usage of the pluralize filter: {{ obj|pluralize:"plural suffix" }} pluralize requires specifying the current number and adding the plural word.Supports 0 to 2 words, use two words when necessary -
Return a random character, value from a string or array
How to return a random character from a string, array, value in AnQi CMS template?The random filter can return a random character or value from a string, array.Usage of the random filter: How to use {{ obj|random }} For example, to return any value from [1,2,3,4,5], you can write: {{ "1,2,3,4,5"|split -
Remove HTML tags from HTML code
How to remove tags from HTML code in AnQi CMS template?The striptags filter can remove all HTML tags from the HTML code.removetags filter can remove specified tags from html code.How to use the striptags filter: {{ obj|striptags }} removetags filter usage -
Parse HTML code and output without escaping
How to parse HTML code without escaping in Anqi CMS template?The safe filter can disable the default escaping attribute of template output, allowing direct output of HTML code to the interface for the browser to parse the HTML code.Generally used in rich text output, such as displaying article details and the like.Note: Use the safe filter, it is assumed by default that your output is safe, it will not escape special characters, so if you want to replace -
Extract elements from a string or array at specified positions
How to extract a string, and elements from an array at specified positions in Anqi CMS template?The slice filter can extract elements from a string or an array at specified positions.For example, get the third to the seventh elements of an array with 10 elements.Usage of slice filter: Usage method: {{obj|slice:"from:to"}} Note that from and to are separated by :.like return [1, -
Split a string into an array using a specified delimiter
How to split a string with a specific format into an array in AnQi CMS template?The split filter can split a string of a specific format into an array using a specified delimiter.If the delimiter is not present in the string, it will return an array of length 1, with the value being the string itself.If the delimiter is empty, it will split into an array by each UTF-8 character.You can also use make_list to quickly split strings -
Format any value to a string output
How to format numbers, strings, arrays, and other arbitrary values into strings with a specified format in Anqi CMS template?The stringformat filter can format numbers, strings, arrays, and any other values into a string output according to a specified format.Some formatting standards: %v Output structure {10 30}%+v Output structure display field names {one:10 tow:30}%#v Output structure source -
Truncate strings or HTML code and add...
How to cut and add ... to strings or HTML code in Anqi CMS template?The truncatechars filter can truncate strings and add... This method will truncate words, including the specified length...The truncatechars_html filter can truncate HTML code and add... The method will truncate words, including the specified length... trun -
URL parameter escaping
How to escape URL parameters in AnQi CMS template?The urlencode filter can escape URL parameters.The iriencode filter can escape URL parameters, except for /#%[]=:;All other characters outside of the URL-encoded characters will be encoded in the URL parameter encoding format.The usage method of the urlencode filter: {{ o -
Find and parse the URL string in the text into a clickable a tag
How to find and parse the URL strings in the text into clickable a tags in the Anqi CMS template?The urlize filter can find and convert URL strings in text to clickable a tags.The urlizetrunc filter can find and parse URL strings in text into clickable a tags, and can specify the text displayed in the a tag to be truncated to a specified length.How to use urlize over -
Calculate the number of words in a string
How to calculate the number of words in a string in Anqi CMS template?The wordcount filter can calculate the number of words in a string.The word count will be distinguished by spaces. If it does not contain spaces, it is counted as a word.Returns an integer. Usage of the wordcount filter: {{ obj|wordcount }} Example demonstration{{ ""|wordco -
Automatic line break for long text
How do I make long text automatically wrap to a specified length in Anqi CMS template?The wordwrap filter can automatically wrap long text to a specified length.The wordwrap divides words by spaces. If there are no spaces, it is considered as one word.Therefore if Chinese characters are continuous, they will not be wrapped in a new line. Usage of the wordwrap filter: {{ obj|wordwrap:numbe -
Three states of OR and NOT
How to judge or with and non three states in Anqi CMS template?The yesno filter can be in or, non, and three states. The default values of yesno are 'yes', 'no', and 'maybe'.You can also define these three values as others. When the value is false, return no, when the value is true, return yes, when the value is nil, return maybe. Use -
User Details Tag
Instructions: Used to obtain user details. Usage method: {% userDetail variableName with name="field name" id="1" %} Variable name is not required. If a variable name is set, it can be called later using the variable name. If no variable name is set, the result is output directly.The userDetail supports the parameters: user ID id.The id is required, used to specify which one to retrieve -
User Group Details Tag
Description: Used to obtain user group detail data Usage: {% userGroupDetail variableName with name="field name" id="1" %} Variable name is not required. If variable name is set, subsequent calls can be made through the variable name. If variable name is not set, the result is output directly.The userGroupDetail supports parameters such as user group ID id.i -
Home Banner List Tag
Description: Used to get the home page banner list usage: {% bannerList variable name %} If the variable is defined as banners {% bannerList banners %}...{% endbannerList %} banners is an array object, so a for loop is needed to output item as the for loop body -
Document Model Detail Tag
Instructions: Used to obtain the document model detail data Usage: {% moduleDetail variable name with name="field name" id="1" %} The variable name is not required. After setting the variable name, subsequent calls can be made through the variable name. If the variable name is not set, the result is output directly.The moduleDetail supports the parameters: model ID id.The id is not required, it will default to the current model. If you need to specify a model, you can do so by setting the id or token.Model URL Alias -
Translation label for template text
Description: Used for translating specified text in templates. Usage: {% tr variable_name %} The use of translation fields is subject to the template supporting multi-language functionality.The method to enable multi-language functionality in the template is as follows: Create a 'locales' directory under the template directory, and then create a folder named after the current language code, such as zh-CN or zh-TW.Create a yml file in the folder, for example, default.yml.Directory structure is as follows: ./locales ├── en-us │ └── -
Get the list of multilingual site labels
Instructions: Used to obtain a list of multilingual sites. Usage: {% languages variable name %} For example, define the variable as websites {% languages websites %}...{% endLanguages %} languages does not support parameter settings, languages will retrieve all multilingual sites.websites is an array object, therefore you need to use a for loop to output item as the variable within the for loop body -
dump filter: print the structure type and value of the variable
How to view the structure type of variables in Anqi CMS template?The dump filter can print the structure, type, and value of a variable.How to use the dump filter: {{ obj|dump }}For example, to view the structure of bannerItem, you can write: {{ item|dump }}# Display result&config.BannerItem{Logo:"http://127.0.0.1"} -
Custom Content Tag
Instructions: Used for custom content information in the background Usage method: {% diy variable name with name="field name" %} The variable name is not required. If a variable name is set, it can be called later through the variable name. If no variable name is set, the result is output directly. diy supports parameters such as Site ID siteId siteId Generally, it is not necessary to fill in, if you use multi-site management in the background to create multiple sites and want to call data from other sites, you can specify siteId -
Json-LD Custom Call Tag
Json-LD is a data format used to describe web content, using JSON to represent data and using specific syntax to describe web content.The background function enables the structured data feature after which, a tag named -ld will be inserted into the page, the content of which is structured data.If you want to control the content of Json-LD more freely, you can use the tag {% Ld %} ... {% endLd %}.You only need to wrap the content within {...} -
filter: convert the variable to JSON output
How to convert a variable to JSON output in Anqi CMS template?The filter can convert a variable to JSON output. -
filter: render Markdown content to HTML
How to render a variable as HTML in the Anqi CMS template?The render filter can render a variable into HTML. -
Filter: Get image thumbnail
How to get the thumbnail of the image in Anqi CMS template? thumb The filter can retrieve a thumbnail from the image address. -
Prevent the template engine from parsing the content inside the tag
The `{% verbatim %}` tag is used to prevent the template engine from parsing the content within the tags.Main function 1. -
get product SKU tag
Retrieve detailed information about the SKU (Stock Keeping Unit) of a specified product, including specifications, price, stock, wholesale rules, and more.This interface is suitable for scenarios where detailed product specifications and purchase options need to be displayed. -
Format Price Tags
AnQiCMS v3.5.6 version and later supports, older versions do not support Due to AnQiCMS's price field using the fen as the unit, it is not suitable for direct display output to the template, therefore, the price needs to be converted to yuan before output, the default output is more complex, it needs to be converted to float64 first, then divided by 100, and then formatted to two decimal places output{%- set price = item.Price|float/100 %}\u0026lt;span>${{price|floatformat