Use Rules to Build Drupal Membership Sites

Drupal Rules

We often have OSTraining members who want to build membership sites in Drupal.

There are a variety of ways in which you can control access to your content. We’ve covered the Content Access and Taxonomy Access modules before.

However, using the Rules module has several advantages for membership sites:

  • If you use the normal permissions system to control access, that won’t do a good job of telling the users why they can’t access the content. With Rules, you can create an easy to understand message, “You must be logged in as Premium Member to see this content”.
  • With Rules, you can redirect users to any URL that you want. You can send them to a sales page, or perhaps to the login or registration forms.
  • Once set up, this system can be very easy to use. All the content creators need to do is check a box marked, “Premium Content”.

Before you start this video, you will need to do one thing on your Drupal site. Make sure you have a Boolean field called “Premium Content”. We’ll use that field to control access.

Author

  • Steve Burge

    Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

0 0 votes
Article Rating
Subscribe
Notify of
4 Comments
Oldest
Newest
Inline Feedbacks
View all comments
SimonW
8 years ago

Good idea ! Never have thought of using Rules for content access control. Thanks !

steve
steve
8 years ago
Reply to  simon

You’re welcome, thanks Simon

Aldo
Aldo
8 years ago

Great 🙂

Nadia
Nadia
4 years ago

Thanks for the awesome explanation 🙂 I would like to mention another simple and nice option — the Role Expire module. With it, we can create, for example, a Subscriber role and set a role expiry date for it in the UI. Then we can make particular content only available to Subscriber. 

4
0
Would love your thoughts, please comment.x
()
x