How to display the blocks to display in certain page in Drupal? Consider a module deserts:


page1:- deserts/* 
page2:- deserts/*/*
page3:- deserts/*/*/*


A dynamic content ...

I have three blocks, namely a,b and c:


Block a should be displayed only in page1
Block b should be displayed only in page2
Block a should be displayed only in page3


How should do that restriction?
Use the context module. Though I'm not generally a fan of this module, this is one of the cases where it comes in handy.

Add a condition for a path. So if I want a block on page 1, but not page 2 or 3, I would write the paths like so, one for each block:

Case 1 - Block A


deserts/*
~deserts/*/*
~deserts/*/*/*


Case 2 - Block B


~deserts/*
deserts/*/*
~deserts/*/*/*


Case 3- Block C


~deserts/*
~deserts/*/*
deserts/*/*/*


The ~ means to exclude in this case. After that, add the block to the region you would like for it to show up. You can also add back in specific paths that might otherwise be excluded, and vice versa.