The "content peeking" functionality is useful when you have an access-restricted post and you want unauthorized users to be able to see the teaser, but not the full post. For example, you may have a member-only article that you want to feature with a teaser on a public landing page, and you want to have people sign up for a membership and/or login to view the full article text.
(In the past, you had to set up two posts to achieve this functionality: one access-controlled and one not access-controlled, with a destination redirect from one to the other. With content peeking, you can do everything within a single post!)
Important things to know before using content peeking
- Even though the feature has been well-tested, this is a relatively new feature that circumvents Drupal's built-in access control. We recommend against using content peeking for highly-sensitive content. The intended use is for content that is not sensitive, but does require a membership or payment, for example.
- When using content peeking on a post (or on all posts of a post type), that post will show up in search results. Even though people will not be able to see the full post, parts of the full post may be visible in the excerpts in the search results.
Setting up content peeking on the post-type level
To set up content peeking for all posts of a specific post type:
-
Choose Manage post types from the commands menu.
- Click edit for the post type on which you want to set up content peeking.
- Expand the Access control field set.
- For Visibility to unauthorized users, select Show full teaser.
- Unauthorized users will now be prompted to log in when trying to view full posts of this post type. (Unless it has been overridden on a post-by-post basis, see the section below.)
Setting up content peeking on a post-by-post basis
- Open up the Access tab.
- For Visibility to unauthorized users, select Show full teaser.
- Unauthorized users will now be prompted to log in when trying to view the full post.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article