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:

  1. Choose Manage post types from the commands menu.
  2. Click edit for the post type on which you want to set up content peeking.
  3. Expand the Access control field set.
  4. For Visibility to unauthorized users, select Show full teaser.
  5. 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.)

To disable content peeking and go back to the way it worked before, select Do not show post on step 4.

Setting up content peeking on a post-by-post basis


To setup content peeking on a post, on the post editing form:
  1. Open up the Access tab.
  2. For Visibility to unauthorized users, select Show full teaser.
  3. Unauthorized users will now be prompted to log in when trying to view the full post.

To make the post use whatever is configured on the post type level (see previous section in this article), select Post type default on step 4.