Reading view

Do we have Responsive Menu for Drupal 11?

I am currently using the Responsive Menu module in Drupal 10 and planning to upgrade the core to Drupal 11. Since my site depends on this module, I would like to know whether Responsive Menu is compatible with Drupal 11, or if there is an updated version available for Drupal 11.

submitted by /u/Great_Banana_123
[link] [comments]
  •  

Upgrading a Theme from D10.4.3 to D11

I currently have a custom Drupal theme that is working well with Drupal 10.4.3. I am planning to upgrade to Drupal 11, as it appears to be the stable, long-term supported version.

What is the recommended process for upgrading a theme from Drupal 10.4.3 to Drupal 11?

For context, I previously migrated my site from Drupal 7 to Drupal 10. During that transition, I had to rewrite the theme from scratch due to major architectural changes. I am hoping that such a complete rewrite will not be necessary when upgrading from Drupal 10 to Drupal 11.

Any guidance or best practices would be appreciated.

submitted by /u/Great_Banana_123
[link] [comments]
  •  

[Drupal 10] How are file-type icons handled after migrating from Drupal 7?

[Drupal 10] How are file-type icons handled after migrating from Drupal 7?

I'm new to Drupal development and recently migrated a Drupal 7 theme to Drupal 10. In Drupal 7, the file fields displays file-type icons (e.g., icons/application-pdf.png) next to file links, but after migrating to Drupal 10, those icons are no longer displayed, and I’m unsure how file-type icons are handled in the newer versions of Drupal. While searching the codebase, I found the following icon files:

$ find . -type f -iname "application-pdf.png" ./core/themes/claro/images/classy/icons/application-pdf.png ./core/themes/starterkit_theme/images/icons/application-pdf.png ./core/profiles/demo_umami/themes/umami/images/classy/icons/application-pdf.png 

I can confirm that file metadata (such as file size) is still available and rendered correctly via my custom Twig template my_custom_theme/templates/field/file-link.html.twig (this file is a copy of core/modules/file/templates/file-link.html.twig without any change. I can remove it when suggested) as shown below:

<!-- BEGIN OUTPUT from 'core/modules/system/templates/field.html.twig' --> <div> <div>Paper</div> <div> <!-- THEME DEBUG --> <!-- THEME HOOK: 'file_link' --> <!-- 💡 BEGIN CUSTOM TEMPLATE OUTPUT from 'themes/custom/my_custom_theme/templates/field/file-link.html.twig' --> <span class="file file--mime-application-pdf file--application-pdf"><a href="/sites/default/files/manual/computer.pdf" type="application/pdf">computer.pdf</a></span> <span>(2.26 MB)</span> <!-- END CUSTOM TEMPLATE OUTPUT from 'themes/custom/my_custom_theme/templates/field/file-link.html.twig' --> </div> </div> <!-- END OUTPUT from 'core/modules/system/templates/field.html.twig' --> 

However, there is no CSS style named file in Chrome developer tools. See the screenshot below:

Screenshot of the Chrome developer tools

What I’d like to achieve is to display a file-type icon (say icons/application-pdf.png or svg whatever Drupal 10 default is) before the file link, similar to Drupal 7.

A workaround would be to copy the icons from core/themes/claro/images/classy/ into my custom theme and adjust the CSS in my_custom_theme accordingly, but this doesn’t feel like a clean or recommended solution.

What is the proper way to display standard file-type icons next to file links in Drupal 10?

submitted by /u/Great_Banana_123
[link] [comments]
  •  
❌