drupaldrupal-blockspathauto

Drupal: assign block to a specific content type


I made a customized template called node-mynode.tpl.php Whenever a node of type mynode is requested, then node-mynode.tpl.php is automatically used.

However, now user wants to see a specific menu block in this case.

Question: How can I assign a block to a specific content type?

Hint: I have started to look at URL aliases with Pathauto. I suspect one solution may lie in this direction.


Solution

  • Give all of your mynode type nodes an automatic alias that starts with /mynode and use the page specific visibility settings for the block, showing only on the pages that start with /mynode/*.