This module adds custom width options for individual content items when used with the Solo theme. It also includes a feature for dynamic color schemes that can adapt based on content type, taxonomy, user roles, or specific URLs.
Solo Utilities is the PHP half of the Solo theme. It adds content widths, color scheme rules, block title controls and a sub-theme command for site builders who use Solo.
Solo 2 requires this module. It also holds the tools that move a site from Solo 1 to Solo 2: an upgrade page and Drush commands that scan, rename and restore.
Start here
Features
- Custom content widths: adds a dropdown to the content edit form. Choose "None" to use the default width, or pick a width for that one item. Turn it on in the Solo theme settings, under Global Site Settings: "Enable custom widths for individual content items or for each content type".
- Color Schemes rules: go to Configuration > System > "Solo Utilities" > "Color Schemes". Each rule has a "Label", an "Enabled" box, "Select a category", "Choose the desired color scheme" and "Conditions" tabs. A conjunction setting decides whether all conditions or any condition must match. The list shows Label, Status, Weight, Selected theme, Theme category and Predefined theme.
- Block title controls: on the block configuration form, "Block title visibility mode" replaces the core "Display title" checkbox. The choices are "Visible (always render)", "Visually hidden (screen readers only)" and "Do not render at all". "Block title tag" sets the heading level, H1 to H6, or a Div.
- Sub-theme generator:
drush solo:subtheme my_themecreates a sub-theme inthemes/custom/my_themefrom Solo's starterkit. Add--label="My Theme"to set the display name. It needs Drush 12 or later. It refuses an invalid, reserved or taken machine name and never overwrites a folder. - Solo upgrade page: go to Configuration > System > "Solo upgrade". For each Solo theme and sub-theme it shows the base theme, the regions that hold enabled blocks and whether the settings use the new names. "Move settings to the new names" and "Restore earlier settings" each open a confirmation form. The page never changes sub-theme code.
- Upgrade scan:
drush solo:preflightreads sub-themes and custom modules and lists Solo PHP function calls,@solo/template paths,libraries-overrideentries and copied Solo templates. It writes nothing. It exits with 0 when nothing is listed and 1 when something is. - Class renamer:
drush solo:migrate-classesrenames Solo 1 classes, library IDs and variables. It is a dry run unless you add--apply. Changing stored configuration or content (--stored,--content) needs--backup-confirmedand--report. It writes a rollback log, anddrush solo:migrate-classes-rollbackreads that log. The renamer works from maps of 344 library IDs, 71 files, 44 classes, 34 JavaScript names and 26 variables. - Settings restore:
drush solo:settings-restoredoes the same as "Restore earlier settings" on the upgrade page. Every Drush command also has a hyphen alias, for examplesolo-preflight.
Submodules
- Solo Utilities Compatibility: keeps custom code working that reads Solo settings by their old names or calls the Solo 1 helper functions. Install it only when
drush solo:preflightreports such code.
Permissions
Access to the Color Schemes pages needs one of these permissions: "Administer all Color Schemes Rules", "View Color Schemes Rules", "Create Color Schemes Rules", "Edit Color Schemes Rules" or "Delete Color Schemes Rules". The upgrade page needs "administer themes". The older mixed-case permission names stay as "Deprecated: ..." entries until 3.0.0, and drush updatedb moves each grant to the new name.
Installation: get started in 3 steps
- Install the module with Composer:
composer require 'drupal/solo_utilities:2.0.x-dev@dev'Version 2 has no tagged release yet. Until one is published, install the development release shown above.
- Enable it on the Extend page, or with Drush:
drush en solo_utilities - Open "Color Schemes" under Configuration > System > "Solo Utilities" and add your first rule.
Updating from Solo 1
- Run
drush updatedb. It moves the permissions and the theme settings to the new names. - Run
drush solo:preflightand fix what it lists. - Run
drush solo:migrate-classesas a dry run, then apply it.
Limitation: until the settings are moved, Solo 2 shows default settings. "Restore earlier settings" discards settings saved after the move and cannot be undone. Run it before you roll the code back.
Requirements
- Drupal ^11.3 || ^12
- PHP 8.3 or later
- The core Node module
The Color Schemes pages work only when the Solo theme, or a sub-theme of it, is the default theme or in the active theme hierarchy. Solo 2 is the compatible theme. Composer will not install this module next to Solo 1.
Support and maintenance
Questions, ideas, and bug reports are welcome. Please use this project’s issue queue so discussions and solutions remain available to the Drupal community.
Maintainers monitor issues, but response times depend on availability.
Developed and maintained by Alaa Haddad of Flash Web Center, LLC.
AI disclosure: AI tools assisted with drafting and reviewing this project description. The maintainer verified the final content against the project source.
Ask your assistant about Solo Utilities
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- node Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.