Introduction
One of the defining features of the RSMembership! component is the possibility to offer users that purchase a subscription on your site extra content. This content will only be available when the subscription is active, once a subscription expires, the bonus content will no longer be accessible until the user renews his subscription.
Add content article restrictions
The most common restriction applied through the component is the content article restriction. With this you can prevent users from viewing the full article if they do not have a proper subscription. The article intro can still be viewed in general listings, the actual restriction is applied only on the article's details page.
In order to add this type of restriction you will need to access the configuration of your membership plan and go to the Shared content tab. Clicking the New button in this tab will open a modal window where you can select the type of restriction that will be applied with the current membership.
1. Content (Article) restriction
- selecting this option will provide a full list of your available content articles;
- you will only need to select the article(s) you want to add to the subscription plan and click the Add the selected items button.
2. URL restriction
- with this option you will first need to select the location of the URL: Frontend or Backend
- after selecting the location you will need to add the exact URL of the article using the non SEF version, for example: index.php?option=com_content&view=article&id=24
In both cases the user will not be able to access the article details page without a proper subscription, instead of viewing the article the user will encounter a message informing him that a subscription is required for this content.
Another way to restrict the content of an article is through the {rsmembership} tags. The exact syntax for this implementation is:
{rsmembership id="1"} => this is the starting tag that contains the membership id as a parameter
restricted content
{else} => this is used to define what should be displayed if the user does not have a proper subscription
normal content
{/rsmembership}
With this implementation the article details page will be accessible by all users, but without a proper subscription the user will only be able to view the normal content.
Conclusion
RSMembership! is a powerful tool that will help you manage site subscriptions and content access with an easy to understand, easy to use interface. You can also override the default Joomla! New account creation process so that users can only create an account on your site by subscribing to one of your available membership plans. There are numerous scenarios where this component can be used, you can refer to the following links for full access to the component's online documentation and demo server: