Render a menu differently based on region I use Drupal 7 and I’d like to have two menus rendered different: one in the nav bar showing dropdowns links for child pages, and another that simply lays out all links in the sidebar. While I can get this sidebar functionality by targeting a specific menu name, I’d like to apply these rules more generally by targeting any menu that gets placed into the region. Is it possible to select regions in theme_menu_link?
Also open to the idea that I’m totally off on my approach for this.
You can add template suggestions. Because menus don't know their region, you first have to add a helper variable in block preprocessing:

function YOURTHEME_preprocess_block(array &amp;$variables) {
  if (!empty($variables['elements']['#id'])) {
    $variables['content']['#attributes']['data-block-id'] = $variables['elements']['#id'];
  }
}


After that you can alter the menu template suggestions

function YOURTHEME_theme_suggestions_menu_alter(array &amp;$suggestions, array $variables) {
  if (isset($variables['attributes']['data-block-id'])) {
    $block = \Drupal\block\Entity\Block::load($variables['attributes']['data-block-id']);
    if ($block) {
      array_unshift($suggestions, 'menu__' . str_replace('-', '_', $block-&gt;getRegion()));
    }
  }
}


Now you can use twig templates like menu__REGIONNAME.html.twig for all menus in a given region.