show archive block on every page containing certain content type I have created one archive block using views for a content type. It holds the list of all the contents grouped year+month wise. 


  Now I want to display it on the left sidebar of all the pages having
  this content type.


Using Block configuration of this archive block I have displayed it on certain pages, but I can't set it to appear on all the pages of type node/*, because all nodes do not contain that very content type.

Please help if anyone knows the solution to it .
If you are using Drupal 7, you can go to Home » Administration » Structure » Blocks, and hit configure next to block you need:


In the Visibility settings section use Content types tab. In Drupal 8 it looked similar and probably will not change significantly.


The same functionality was backported to 5 and 6 by Block Node Visibility module.

If you don't want to install above module, and you're using Drupal 6, use Pages tab, and select last radio button "Pages on which this PHP code returns TRUE", and use code like:

&lt;?php
// valid node id in view mode
if ( arg(0) == 'node' AND is_numeric(arg(1)) AND arg(2) == FALSE ) {

    $node = node_load(arg(1)); // cached

    if ( $node-&gt;type == 'insert type you want' ) {
        return TRUE;
    }
}

return FALSE;
?&gt;


Code sample by bluesherpa from Drupal.org.