If you create a page display for views, you can accomplish this using access controls. The first available screen that the user has permissions appears in the view.
- Creating a Mapping for an Authenticated Custom View
- Set the path to the page
- Set access restrictions (for example, using an authenticated role)
- Create a display for anonymous viewing by a user
- Set the page path to the same value
- Optionally deny access to an anonymous role (optional, because if views can load an authenticated display for the user, he will not worry about it, but may contain it explicitly)
Since you cannot reorder impressions in a view (for now), you must define the views in order of greatest restriction to least restriction.
For more complex displays, you can use Panels Pages to render the page in different ways based on the role of the user.
If you want to distinguish between anonymous and authenticated users, you can specify that different blocks of content are visible for each role.
On my own site, I needed to distinguish between administrators and everyone else, so I could not use the role of an authenticated user to determine access for individual elements. Like Views, with the help of panel pages, you can define several variations of pages that use the same path. Administrators have access to the first option, and all other users switch to using the second.
gapple
source share