After installing a theme, display a link to "install another theme"

Created on 9 December 2012, over 11 years ago
Updated 12 October 2023, 8 months ago

This issue is the obvious followup to #1446650: After installing module display link to "install another module" โ†’ .

Problem/Motivation

Make installing another theme easier by linking to the install page after a new theme is installed.

Proposed resolution

Add a "Install another theme" link after a new theme is installed.

Also, to match setup of core/lib/Drupal/Core/Updater/Module.php, set up row of links in the following order:

  • Install another theme
  • Enable newly added theme
  • Administration pages

Remaining tasks

Reviewed and Tested by the Community.

From core/lib/Drupal/Core/Updater/Module.php:

 /**
   * {@inheritdoc}
   */
  public function postInstallTasks() {
    // Since this is being called outsite of the primary front controller,
    // the base_url needs to be set explicitly to ensure that links are
    // relative to the site root.
    // @todo Simplify with https://www.drupal.org/node/2548095
    $default_options = [
      '#type' => 'link',
      '#options' => [
        'absolute' => TRUE,
        'base_url' => $GLOBALS['base_url'],
      ],
    ];
    return [
      $default_options + [
        '#url' => Url::fromRoute('update.module_install'),
        '#title' => t('Install another module'),
      ],
      $default_options + [
        '#url' => Url::fromRoute('system.modules_list'),
        '#title' => t('Enable newly added modules'),
      ],
      $default_options + [
        '#url' => Url::fromRoute('system.admin'),
        '#title' => t('Administration pages'),
      ],
    ];
  }
<!-- See https://drupal.org/core-mentoring/novice-tasks for tips on identifying novice tasks. Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->

User interface changes

Before:

After:

API changes

None

โœจ Feature request
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Updateย  โ†’

Last updated about 12 hours ago

  • Maintained by
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States @tedbow
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States @dww
Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States David_Rothstein

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024