Certainly, as an experienced website operation expert, I am more than happy to delve into the essence of single-page management in AnQiCMS and guide you effortlessly through the creation and optimization of independent pages such as 'About Us' and 'Contact Us'.
Single page management of AnQi CMS: easily build independent pages such as "About Us", "Contact Us", etc.
In modern website operations, independent pages such as "About Us" and "Contact Us" play a crucial role.They are not only the windows for displaying corporate image and conveying core values, but also the key touchpoints for users to establish trust and communicate effectively.For search engines, these clear and professional independent pages are also important signals for enhancing website authority and user experience.
AnQiCMS, as an enterprise-level content management system developed based on the Go language, is well-versed in this field.It was designed from the outset with the needs of small and medium-sized enterprises, self-media operators, and efficient content management in mind, providing an intuitive and powerful single-page management module that allows you to quickly build and optimize these key independent pages as if you were stacking building blocks.
Backend operation: create your first independent page
Log in to the AnQiCMS admin interface and you will find everything in order, with clear and straightforward operation logic. To create an independent page such as "About Us" or "Contact Us", you just need to follow the following path:
First, find it in the left navigation bar"Page Resources", click to expand and select“Page Management”. Here, you will see all the single-page lists created. To add a new page, just click on the interface on the“Add Single Page”Click the button to start the page creation journey.
Enter the creation page form, where you will see a series of intuitive fields that together make up the core content and properties of the page:
- Page NameThis is the main title displayed on your website front-end, as well as the name used to identify the page in the background management. For example, you can fill in 'About Us' or 'Contact Us'.
- Single page contentThis is the core of the page. AnQiCMS provides a rich text editor with various functions, allowing you to easily insert text, images, videos, and even support Markdown format, making the content layout beautiful and expressive.Here, you can write a detailed company profile, team culture, development history, or provide detailed contact information and map directions.
- SEO title, keywords, and single-page summaryThese fields are crucial for the search engine optimization of the page.
- SEO titleIt will be displayed in the search engine results title position, it is the first line of defense to attract users to click, please be concise and include core keywords.
- KeywordsHelp search engines understand the theme of the page, please choose words highly relevant to the content, separated by English commas.
- Single page introductionIt is the descriptive text in the search engine results, usually the content summary that users see before clicking, and it is written to be concise and attractive to users.
- Custom URLThis is a highlight of AnQiCMS in terms of SEO friendliness.The system will automatically generate a pinyin URL alias based on your page name, for example, "guanyuwomen" or "lianxiwomen".Of course, if you are not satisfied with the automatically generated URL, you can always manually adjust it, setting a custom URL with more brand character or more concise and memorable.Ensure the uniqueness of this custom URL throughout the site, as it will have a positive impact on the page's inclusion and ranking.
- Display orderThis field allows you to flexibly control the sorting of a single page in the list. The smaller the number, the earlier the page is displayed, which is very practical for displaying pages in a specific order in the navigation menu.
- Banner image and thumbnailThese two items make your page more visually appealing. You can upload a banner image that reflects the corporate image for the "About Us" page, and also set a concise thumbnail for the "Contact Us" page to display in lists or specific modules.
- Single page templateThis is one of the manifestations of the flexibility of AnQiCMS. The system defaults to using
page/detail.htmlAs a single-page display template. However, if you want the "About Us" page and the "Contact Us" page to have completely different design styles and layouts, you can specify exclusive templates for them.For example, you can createpage/about-us.htmlandpage/contact-us.htmlThen in the single-page editing interface of each, it is designated as the corresponding single-page template. This allows website design to no longer be limited by a fixed framework and provides a high degree of customization freedom.
Fill in and save, and your independent page will be created. It is now ready to be displayed on the website's front end for visitors.
Front-end display: Make the independent page come alive in the website.
AnQiCMS's template system draws on the syntax of the Django template engine, which is simple and powerful.Once you have created a single page in the background, the next task is to present it on the website front-end.
By default, AnQiCMS will automatically match the corresponding template file according to the page ID or custom URL alias. For example, a single page with an ID of 10, if a custom template is not specified, may usepage/detail.htmlorpage/10.htmlto render the content
Make flexible use of custom templates:
As mentioned before, one of the most attractive points of AnQiCMS is its powerful customization capabilities. If you want the "About Us" page (assuming its custom URL isabout-us)Has a unique design, you can create a file named in your template folderpage/about-us.htmlin the "Single Page Template" field in the backgroundabout-us.htmlAfter that, this page will automatically load and apply this exclusive template.
In your template file, you can use the powerful tags provided by AnQiCMS to dynamically retrieve page content. For example,pageDetailTagis a tool for getting the details of a single page:
{# 获取当前页面的标题 #}
<h1>{% pageDetail with name="Title" %}</h1>
{# 获取当前页面的内容,注意使用 |safe 过滤器以解析HTML #}
<div>
{% pageDetail pageContent with name="Content" %}
{{ pageContent|safe }}
</div>
{# 如果您上传了Banner图,也可以这样调用 #}
{% pageDetail pageBannerImages with name="Images" %}
{% if pageBannerImages %}
<img src="{{ pageBannerImages[0] }}" alt="{% pageDetail with name='Title' %}" />
{% endif %}
If you want to list multiple single pages, such as displaying “About Us”, “Contact Us”, “Privacy Policy”, and other links, in the navigation menu, footer, or other locations on the website, pageListTagCan be put to use:
`twig
- {% pageList pages %}
{% for item in pages %}
<li>
<a href="{{ item.Link }}">{{ item.Title }}</a>
</li>
{% end