Conditional display of a block

So far in this chapter we have dealt with creating and positioning blocks. By default, blocks are set to display on every page, but in this recipe we will see how to configure the pre-existing Who's new block so that it displays only on the homepage, and only for logged in users.

How to do it...

  1. Select Structure from the admin menu, then select Blocks.
  2. Find the Who's new block and select configure.
  3. Under the Pages tab, select Only the listed pages.
  4. In the text field enter<front>.
  5. Select the Roles tab.
  6. Check authenticated user, and administrator.
  7. Select Save block.
How to do it...

How it works...

The block has now been configured so that it ...

Get Drupal 7 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.