Hi

Imagine the following basic scenario:

  • I have 2 roles setup, one called "basic" and the other called "advanced".
  • I have a list of 4 articles currently published; I will be adding more later.

I already have the following (very!) basic code working within Contemplate to control the visibility of the body on each article. I need to prevent anonymous users from seeing any content:

global $user;
if (in_array('basic', $user->roles)) {
   print $body;
}

However, I want to use Contemplate so that:

  • "basic" role can ONLY view the body of the most 2 recently published articles BUT can not see the body of all the remaining articles. Contemplate (and Views) will allow me to still show node teasers to "basic" members.
  • "advanced" role can view the body of all articles.

Naturally, further articles will be added in time so the viewing mechanism needs to be dynamic to reflect the 2 most recently published articles.

Hope that makes sense!!! Think of it as a slightly more complex subscription based website where "basic" and "advanced" members get an increasing amount of content.

Many, many thanks to anyone who can help.

Ali