In content operation, introducing VIP exclusive content or membership services to a website is an effective way to enhance user stickiness and achieve content monetization.AnQiCMS (AnQiCMS) fully understands the importance of this need, therefore it has built a complete user group management and VIP system, allowing you to easily build 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 different levels of user groups 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 others, granting them different benefits, including access to specific content.
Step 1: Build your VIP user group
In the AnQi CMS backend, you can meticulously plan your member 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 the exclusive benefits.It is more important that you can specify a "Level" for each user group.This level is a number that will become the key basis for distinguishing the access privileges of different members.
Imagine, you can set the level of the ordinary user group to 0, silver VIP to 1, and gold VIP to 2.This is how your membership system has a clear hierarchy.If your membership service involves payment, you can also configure the 'purchase price' and 'discount price' of the membership here, laying the foundation for the subsequent membership purchase process.
Step 2: Create your VIP exclusive content
Content is the foundation of membership-based services. In AnQi CMS, you can create articles, products, and various other types of content, and tag them with "exclusive" labels.When you edit a document (whether an article or product details), you will find an option for "Document Reading Level" (ReadLevel).
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 will be able to access.In this way, you can accurately control the access threshold of each content.
On the content editing page, you normally write the title, content, set keywords and summary, but before publishing, don't forget to set an appropriate 'document reading level' based on the value of the content and the target audience.
Step three: Present VIP content cleverly on the front-end
How to elegantly display VIP user groups and exclusive content on the website front end after they are set up, which is the key to improving user experience.The Anqi CMS template tags provide powerful flexibility, allowing you to achieve differentiated content display through simple logical judgments.
In your template file, typically on the page that displays article details, you can design it like this:
Firstly, check if the user is already logged in. If logged in, retrieve the current user's group information, especially their 'group level' (Level). Next, get the "ReadLevel" (document reading level) of the currently accessed document. Then, make a comparison: if the user's level reaches or exceeds the reading level of the document, 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.
This 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 shows how to utilizeuserDetail(Get 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 members that follow.On the AnQi CMS backend, you can view the user's VIP "expiration time" (ExpireTime), which is crucial for managing periodic membership services.The system will automatically determine the user's VIP status based on this time, ensuring the accuracy of permissions.Although payment and subscription management usually involves more complex third-party integrations, the user group and content permission management features provided by Anqi CMS lay a solid foundation for these services.
By following these steps, you can flexibly set up and manage VIP exclusive content and membership services in Anqi CMS, creating more value for your website.
Frequently Asked Questions (FAQ)
I want the VIP content to be displayed as a partial summary for normal users for SEO purposes, and to show the full content for VIP users. How should I do that?You can fill in the summary information (such as "Document Brief") in the document description field when editing the content. On the front-end template, for users who are not logged in or have insufficient levels, you can first display the document title and description, and then judge the user's permissions through template tags to decide whether to display the entire content.
currentArchive.ContentIt is still an upgrade prompt. This ensures the search engine friendliness of the content and also implements 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 '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 for Silver VIP to 1.Due to the logical judgment in the template is
userGroup.Level >= currentArchive.ReadLevelTherefore, higher-level VIP users can naturally access all content below or equal to their level.Will the content access permission automatically expire after the membership expires?Yes. The Anqi CMS user details include "VIP Expiration Time" (ExpireTime). The front-end template passes through
userDetailObtained this information of the user, combined with the judgment of the user group level in the background, the system will automatically identify that the user no longer has the corresponding VIP level after the membership expires, thereby restricting access to VIP content.This ensures the accuracy and automation of member services.