When setting up a website with AnQiCMS, the display of single-page content and page lists is an indispensable part.Whether it is an independent content page like 'About Us' or a series of links in the website footer navigation, they both require a flexible and efficient way to manage and present.pageDetailandpageListThese tags are powerful tools designed to meet these needs.They each focus on different application scenarios, yet they work together to build a rich and orderly single-page content system for the website.
pageDetailTags: Refine meticulously, present exclusive content
When we need to fully display the detailed content of an independent page on a single page,pageDetailLabels come in handy.Its core function is to obtain all the details of a specified single page, such as the title, link, page description, complete page content, and even the thumbnail or multiple slide groups configured for the page.
UsepageDetailTags are usually located in two main ways to find the page content you want. You can specify exactly by the unique ID of the page, for example{% pageDetail with name="Title" id="1" %}If you prefer to use meaningful text identifiers, you can also refer to the page's URL alias (i.e., token) as follows:{% pageDetail with name="Content" token="about-us" %}Of course, if you are in a single-page corresponding template file (such aspage/detail.htmlorpage/{单页ID}.html), usually you do not need to specify an ID or token,pageDetailTags will intelligently fetch information from the current page.
PasspageDetailWe can easily call the carefully edited data items in the "Page Management{% pageDetail with name="Content" %}can be fully presented on the front end. Similarly, if you have configured a beautiful Banner image for the single-page, you can also get and display it, adding visual appeal to the page.{% pageDetail pageImages with name="Images" %}to obtain and display it, adding visual appeal to the page.
pageListLabel: Flexible organization, build convenient navigation and index
WithpageDetailFocuses on displaying different details of a single pagepageListTags focus on obtaining a collection of single pages.The main application scenarios require listing multiple single-page links or brief information, such as the website's navigation menu, footer link area, or the 'Popular Single Pages' recommendation in the sidebar.
pageListThe tag is very concise in use, usually does not require additional parameters, and it defaults to retrieving all single-page lists that have been created.Once we get the list of pages, we can traverse them in a loop to extract the title, link, brief description, and thumbnail information of each page.
For example, in the footer section of a website, you may need to list multiple single-page links such as "Privacy PolicypageListIt can be put to good use. With a simple loop, these links can be uniformly presented, saving the trouble of manually adding each link.
In addition,pageListAlthough it defaults to fetching all pages, in actual applications, we often need to filter the list. AnQiCMS provides inforThe flexibility of conditional judgment within loops, for example, you can exclude a specific ID page in the loop, or only display pages that meet certain conditions, thereby achieving a more refined list display.
Collaborative work: Give a tiger's wings to single-page content management
pageDetailandpageListThese tags are the core capabilities provided by AnQiCMS in single-page content management.They collectively赋予网站powerful content organization and display flexibility.pageDetailandpageListThen it is responsible for presenting these background data efficiently and aesthetically to the users.Whether it's building a content-rich standalone page or designing a clear and convenient navigation, these tags are indispensable tools for you, making the operation of single-page content simple and efficient.
Frequently Asked Questions (FAQ):
How do I specify
pageDetailTags to get the specific single-page content I want?Usually,pageDetailThe label will automatically obtain the information of the current page. But if you want to get the content of other specified pages, you can do so through the page ID (for exampleid="5") or the URL alias set in the background.token="about-us")as a parameter to explicitly specify.pageListThe tag has retrieved all single pages of the website, but I only want to display a few of them at a certain position. How do I do that?pageListIndeed, all single-page lists will be fetched. You can usepageListwhen looping through tags on the page, add conditional judgments within the loop to filter. For example, you can judgeitem.IdIs the page ID you want to exclude, or the judgmentitem.TitleContains specific keywords to only display pages that meet your needs.Does the content written in a single page support Markdown format? If it does, how is it rendered on the front end?
pageDetailHow should tags be correctly rendered after retrieval?Yes, AnQiCMS supports Markdown format for single-page content. When you turn on the Markdown editor in the background and write content using Markdown syntax,pageDetailtags obtainedContentThe field will be automatically converted to HTML during frontend rendering. If you need to control the rendering process more finely, you can also in the tag.pageDetailofContentField additionrender=trueorrender=falseParameter, manually decide whether to convert Markdown to HTML.