Sure there is a way to answer your question, and ***without PHP in the block settings*** (as suggested in of the comments), and without the need for any hooks (custom code): you can use the [Rules block visibility][1] module for this. Here is a quote from its project page: > The Rules block visibility module allows [Rules][2] components to be used to control block visibility. This provides Drupal administrators and developers extreme flexibility in controlling when blocks should be displayed on their websites, in addition to the default visibility options provided by Drupal. > The general idea is that if you can do it with Rules, you can use it to control block visibility, so the possibilities are limitless. > Need to show a block only for users registered more than a month ago? > Perhaps you have a block that must be shown only between 8am-5pm on weekdays? > What about displaying or hiding a block based on current weather conditions? > All of this can be done by using Rules block visibility. With that, and as per the "*if you can do it with Rules, you can use it to control block visibility*" above, you've reduced your question to making [Rules][2] "***check the path of the current page***" (so that the appropriate menu block is shown on the appropriate pages). For an illustration of how to use this module, refer to my answer to "https://drupal.stackexchange.com/questions/109984/how-to-stop-a-views-block-from-displaying-to-admins-such-as-user-1/193173#193173". It includes a Rules Component (in Rules export format), which you should replace by the variations below to make it match your specific question. ### For your 1st menu block (baseball): Within the block visibility settings of this block, use this Rules Component: { "rules_block_visibility_show_menu1" : { "LABEL" : "Show block containing menu 1", "PLUGIN" : "rule", "OWNER" : "rules", "REQUIRES" : [ "rules" ], "USES VARIABLES" : { "module" : { "label" : "Module", "type" : "text" }, "delta" : { "label" : "Delta", "type" : "text" }, "result" : { "label" : "Result", "type" : "boolean", "parameter" : false } }, "IF" : [ { "text_matches" : { "text" : [ "site:current-page:path" ], "match" : "baseball\/", "operation" : "starts" } } ], "DO" : [ { "data_set" : { "data" : [ "result" ], "value" : "1" } } ], "PROVIDES VARIABLES" : [ "result" ] } } ### For your 2nd menu block (basketball): Within the block visibility settings of this block, use this Rules Component: { "rules_block_visibility_show_menu2" : { "LABEL" : "Show block containing menu 2", "PLUGIN" : "rule", "OWNER" : "rules", "REQUIRES" : [ "rules" ], "USES VARIABLES" : { "module" : { "label" : "Module", "type" : "text" }, "delta" : { "label" : "Delta", "type" : "text" }, "result" : { "label" : "Result", "type" : "boolean", "parameter" : false } }, "IF" : [ { "text_matches" : { "text" : [ "site:current-page:path" ], "match" : "basketball\/", "operation" : "starts" } } ], "DO" : [ { "data_set" : { "data" : [ "result" ], "value" : "1" } } ], "PROVIDES VARIABLES" : [ "result" ] } } ### For your 3rd menu block (everything else): Within the block visibility settings of this block, use this Rules Component: { "rules_block_visibility_show_menu3" : { "LABEL" : "Show block containing menu 3", "PLUGIN" : "rule", "OWNER" : "rules", "REQUIRES" : [ "rules" ], "USES VARIABLES" : { "module" : { "label" : "Module", "type" : "text" }, "delta" : { "label" : "Delta", "type" : "text" }, "result" : { "label" : "Result", "type" : "boolean", "parameter" : false } }, "IF" : [ { "AND" : [ { "NOT text_matches" : { "text" : [ "site:current-page:path" ], "match" : "baseball\/", "operation" : "starts" } }, { "NOT text_matches" : { "text" : [ "site:current-page:path" ], "match" : "basketball\/", "operation" : "starts" } } ] } ], "DO" : [ { "data_set" : { "data" : [ "result" ], "value" : "1" } } ], "PROVIDES VARIABLES" : [ "result" ] } } [1]: https://www.drupal.org/project/rules_block_visibility [2]: https://www.drupal.org/project/rules