In content operation, introducing VIP exclusive content or membership services to the website is an effective way to enhance user stickiness and achieve content monetization.AnQiCMS (AnQiCMS) is well aware of the importance of this requirement, and therefore has built-in comprehensive user group management and VIP system, allowing you to easily set up and manage such services.
Core: User Group Management and VIP System
One of the core advantages of AnQi CMS lies in its flexible user group management and VIP system.This means you can create user groups of different levels according to your business needs and set unique permissions for each user group.For example, you can set up multiple levels such as ordinary members, silver VIP, gold VIP, and so on, and grant them different benefits, including access to specific content.
First step: Build your VIP user group
In the Anqi CMS backend, you can finely plan your membership system through the user group management feature.Each user group can not only have a catchy name (such as “Gold Member”) but also come with a detailed introduction explaining its exclusive benefits.It is more important that you can specify a 'Level' for each user group.This level is a number, which will become the key basis for distinguishing different member access permissions.
Imagine that you can set the level of the ordinary user group to 0, silver VIP to 1, and gold VIP to 2.Here, your membership system has a clear hierarchical division.If your membership service involves payment, you can also configure the 'purchase price' and 'discount price' for the members here, laying the foundation for the subsequent membership purchase process.
Second step: Create your exclusive VIP content
The content is the cornerstone of the membership service.In Auto CMS, you can create articles, products, and other types of content, and tag them with 'exclusive'.When you edit a document (whether an article or product details), you will find a 'Document Reading Level' (ReadLevel) option.
This 'Document Reading Level' corresponds to the user group level you previously set.If you set the reading level of an article to 1, only users with a group level of 1 or higher can read it completely.If set to 2, only users with a group level of 2 or higher can access.By this means, you can precisely control the access threshold for each piece of content.
On the content editing page, you normally write the title, content, set keywords, and summary, but before publishing, don't forget to set the appropriate 'document reading level' based on the value of the content and the target audience.
Third step: Present VIP content cleverly on the front end
How to elegantly display them on the website front end after setting up the VIP user group and exclusive content, which is the key to improving user experience.The template tags of AnQi CMS provide strong flexibility, allowing you to achieve differentiated display of content through simple logic judgments.
In your template file, usually on the page displaying article details, you can design it like this:
Firstly, determine whether the user has logged in.If logged in, retrieve the current user's group information, especially their 'group level'. Then, obtain the "Document Reading Level" (ReadLevel) of the currently accessed document.Then, compare: If the user's level reaches or exceeds the document's reading level, the full document content is displayed.If the user's level is insufficient, or the user has not logged in, you can choose to display a content summary, a prompt message (such as 'This content is exclusive to VIP users, please upgrade to a member'), or a button to guide the user to log in/register.
The following is a simplified template logic example, helping you understand how it works:
{# 假设当前是文档详情页 #}
{% userDetail currentUser %} {# 获取当前用户信息 #}
{% archiveDetail currentArchive %} {# 获取当前文档信息 #}
<article>
<h1>{{ currentArchive.Title }}</h1>
{# ... 其他文档信息如发布时间、作者等 ... #}
{% if currentUser %} {# 用户已登录 #}
{% userGroupDetail userGroup with id=currentUser.GroupId %} {# 获取用户所在的用户组详情 #}
{% if userGroup.Level >= currentArchive.ReadLevel %} {# 判断用户等级是否足够 #}
<div class="vip-content-full">
{{ currentArchive.Content|safe }} {# 显示完整内容 #}
</div>
{% else %}
<div class="vip-content-restricted">
<p>此内容为 [{{ currentArchive.ReadLevel }} 级] VIP专属,您的等级不足。</p>
<p>立即升级您的会员等级,解锁更多尊享内容!</p>
<a href="/vip-upgrade" class="btn-upgrade-vip">立即升级</a>
{# 您也可以在这里显示部分摘要,例如 currentArchive.Description 或手动截取部分内容 #}
<p>{{ currentArchive.Description }}...</p>
</div>
{% endif %}
{% enduserGroupDetail %}
{% else %} {# 用户未登录 #}
<div class="vip-content-login-prompt">
<p>此内容为 [{{ currentArchive.ReadLevel }} 级] VIP专属,请登录或升级会员。</p>
<a href="/login" class="btn-login">登录</a>
<a href="/vip-upgrade" class="btn-upgrade-vip">升级VIP</a>
{# 同样可以显示部分摘要 #}
<p>{{ currentArchive.Description }}...</p>
</div>
{% endif %}
</article>
This code snippet demonstrates how to utilizeuserDetail(obtain the login user identity and user group ID),userGroupDetail(Get the user group level) andarchiveDetailthese tags, combined withifstatements, to dynamically display VIP content.
Step 4: Continuous management of membership services
Once your VIP system starts running, it is equally important to manage the membership thereafter.In the Anqi CMS backend, you can view the user's VIP "Expire Time" (ExpireTime), which is crucial for managing periodic membership services.The system will automatically determine the VIP status of the user based on this time, ensuring the accuracy of permissions.Although payment and subscription management typically involve more complex third-party integrations, the user group and content permission management features provided by Anqi CMS lay a solid foundation for these services.
Through the above steps, you can flexibly set up and manage VIP exclusive content and membership services in the Anqi CMS, creating more value for your website.
Common Questions (FAQ)
I hope the VIP content can show a partial summary for normal users for SEO, and show the full content for VIP users. How should I operate?You can fill in the abstract information (such as "Document Summary") in the document description field when editing content. On the frontend template, for users who are not logged in or have insufficient levels, you can first display the document title and document description, and then use template tags to determine user permissions before deciding whether to display the full content.
currentArchive.ContentIt is still an upgrade prompt. This ensures the search engine friendliness of the content while implementing member permission control.How to set different levels of VIP users to see different levels of content?For example, Gold VIP can see Silver VIP and general content, while Silver VIP can only see their exclusive content and general content?This is achieved through the "User Group Level" (Level) and the "Document Reading Level" (ReadLevel).You can set the user group level of Gold VIP to 2, Silver VIP to 1, and ordinary users to 0.When you create content, set the exclusive content reading level for Gold VIP to 2, and set the exclusive content reading level for Silver VIP to 1.
userGroup.Level >= currentArchive.ReadLevelTherefore, higher-level VIP users naturally have access to all content below or equal to their level.Will the content access permission automatically expire after the membership expires?Yes. The user details in Anqi CMS include the 'VIP Expire Time' (ExpireTime). The front-end template is through
userDetailThis information is obtained from the user, combined with the user group level on the back end, the system will automatically identify that the user no longer has the corresponding VIP level after the membership expires, thereby restricting their access to VIP content.This ensures the accuracy and automated management of member services.