web-illinois / illinois_framework_theme

An Illinois branded Drupal theme based off of the bootstrap4 theme.
5 stars 1 forks source link

Footer menu titles are not pulled from subtheme blocks, they are pulled from Illinois Framework Theme #774

Open robgasc opened 2 years ago

robgasc commented 2 years ago

Steps

  1. Override titles in footer menu blocks via the block layout configure block in your subtheme. (do not use quick contextual links to edit)
  2. Footer menus update to reflect titles set in subtheme.

Actual: Footer menus remain named as the blocks in the main theme.

Solution: Change how footer menus are rendered in twig so the titles are pulled from the current theme's blocks.

robgasc commented 2 years ago

Note that this change will probably cause issues with existing sites, where the footer title will suddenly be the default again, as the subtheme's blocks will get their titles displayed, and these may be unaltered from default.

robgasc commented 2 years ago

After more research into how footer blocks are being rendered, this is due to the machine name of blocks as they are being pulled matching against the parent theme first, instead of the child theme. Seems the drupal_block from twig tweaks is insensitive to where the block lives in the themes.

A way to address this might be to increase the number of regions for the number of columns in the footer(the current implementation seems to be doing this for adding to column layout by selecting specific footer menu blocks), and let the templates for the blocks handle the containers instead of including the "nav" element in the region--footer.html.twig.