Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Solo Utilities

Security covered Under active development 570 sites

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_theme creates a sub-theme in themes/custom/my_theme from 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:preflight reads sub-themes and custom modules and lists Solo PHP function calls, @solo/ template paths, libraries-override entries 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-classes renames 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-confirmed and --report. It writes a rollback log, and drush solo:migrate-classes-rollback reads 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-restore does the same as "Restore earlier settings" on the upgrade page. Every Drush command also has a hyphen alias, for example solo-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:preflight reports 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

  1. 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.

  2. Enable it on the Extend page, or with Drush:
    drush en solo_utilities
  3. Open "Color Schemes" under Configuration > System > "Solo Utilities" and add your first rule.

Updating from Solo 1

  1. Run drush updatedb. It moves the permissions and the theme settings to the new names.
  2. Run drush solo:preflight and fix what it lists.
  3. Run drush solo:migrate-classes as 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.

Drupal 10–11 PHP ^8.1

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.

Activity

Tracked releases
13
Tracked since
Jul 2024
Latest release
3 weeks ago
Releases (12 mo)
6 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.2 Stable 10–11 Aug 17, 2024
1.0.1 Stable 10–11 Aug 4, 2024
1.0.0 Stable 10–11 Jul 20, 2024