This is the respective issue for https://www.drupal.org/project/drupal/issues/474684 (change record), and part of the #5317 meta-issue.
Parsing .info files for dependency information is already implemented on the modules administration page. Adding support for the same dependencies in theme.info files, and implementing the same behavior on the
admin/appearance
page, would allow designers building heavily customized themes to make safer assumptions about their target sites.A theme might require the existence of imagecache to auto-generate variations of a header image. This would be a nice compromise between systems like Wordpress and Joomla!, which give themes much greater control over the functionality of the site, and Drupal's module-centric approach.
Proposed solution
- Allow themes to add the dependencies to .info files
- Show these dependencies on
admin/appearance
, and make it impossible to install without the requirements via UI or command line- Make it possible to install dependent modules and layout templates when installing a theme (either manually, or via the Project Browser/Installer)
- Validation is added to prevent installing themes that depend on uninstalled modules, and prevent uninstalling modules that are depended upon by installed themes. This is implemented at a level that prevents these installs/uninstalls from occurring programatically or via cli (Drush/Drupal Console).
User interface changes
- Themes listed in
admin/appearance
will list the modules/layouts they depend on and the ability to install/enable that theme will not be available unless those module/layout dependencies are met.- The module descriptions found at
admin/modules
andadmin/module/uninstall
will include themes in their "Required by" description.API changes
Themes will be able to define modules dependencies in their info.yml via the dependencies key.
Recent comments
Welcome to Backdrop! For your setup, you’ll want to create a subtheme of Bootstrap5 Lite itself; the Bootswatch styles (like Cerulean) are just presets that B5 Lite loads, and you can “lock in”...
Basic Theme designing questions, using Bootstrap5 Lite
Hi Rob, Welcome to Backdrop! Here’s a quick overview: Subtheming Bootswatch: You should create your subtheme based on Bootstrap5 Lite, not directly on a Bootswatch style....
Basic Theme designing questions, using Bootstrap5 Lite
Hi Rolf, This happens because CKEditor saves absolute or semi-absolute paths in the HTML instead of using Backdrop’s file stream wrappers (like public://). When you move your site...
Losing link to embedded pictures when moving my installation