Community Documentation

Developing Distributions with Panopoly

Last updated April 25, 2013. Created by populist on June 21, 2012.
Edited by barraponto, stevepurkiss, esmerel, nedjo. Log in to edit this page.

Panopoly is designed to be used as a "base distribution" for other distributions to leverage to quickly build awesome Drupal distributions full of all the magic Panopoly has to offer! In order to take advantage of Panopoly as a base distribution, you need to do the following things:

Include Panopoly's Modules & Libraries In Your Distribution

Panopoly requires several contributed modules and external libraries to function correctly, often with specific patches necessary to make everything work together magically. These modules and libraries must be installed as part of your distribution in order to use the power of Panopoly. In order to do this, add the following lines to your profile's make file:

; The Panopoly Foundation

projects[panopoly_core][version] = 1.0-rc4
projects[panopoly_core][subdir] = panopoly

projects[panopoly_images][version] = 1.0-rc4
projects[panopoly_images][subdir] = panopoly

projects[panopoly_theme][version] = 1.0-rc4
projects[panopoly_theme][subdir] = panopoly

projects[panopoly_magic][version] = 1.0-rc4
projects[panopoly_magic][subdir] = panopoly

projects[panopoly_widgets][version] = 1.0-rc4
projects[panopoly_widgets][subdir] = panopoly

projects[panopoly_admin][version] = 1.0-rc4
projects[panopoly_admin][subdir] = panopoly

projects[panopoly_users][version] = 1.0-rc4
projects[panopoly_users][subdir] = panopoly

; The Panopoly Toolset

projects[panopoly_pages][version] = 1.0-rc4
projects[panopoly_pages][subdir] = panopoly

projects[panopoly_wysiwyg][version] = 1.0-rc4
projects[panopoly_wysiwyg][subdir] = panopoly

projects[panopoly_search][version] = 1.0-rc4
projects[panopoly_search][subdir] = panopoly
projects[panopoly_search][patch][1976178] = http://drupal.org/files/1976178-disable-solr-on-pantheon-1.patch

This will automatically package all of the Panopoly specific modules and dependent modules and libraries through some drush make magic. You will also need to enable them as part of your installation profile which can be done by adding the following to your profile's info file:

; Panopoly Foundation
dependencies[] = panopoly_core
dependencies[] = panopoly_images
dependencies[] = panopoly_theme
dependencies[] = panopoly_magic
dependencies[] = panopoly_widgets
dependencies[] = panopoly_admin
dependencies[] = panopoly_users

; Panopoly Toolset
dependencies[] = panopoly_pages
dependencies[] = panopoly_search
dependencies[] = panopoly_wysiwyg

; Panopoly Recommended - Admin
dependencies[] = navbar
dependencies[] = backports
dependencies[] = simplified_menu_admin
dependencies[] = save_draft
dependencies[] = module_filter
dependencies[] = date_popup_authored

; Panopoly Recommended - Other
dependencies[] = devel
dependencies[] = uuid

Enable Support for Panopoly's Special Install Task

Panopoly improves the dependency checking of the core installer which helps simplify sub-profiles. In order to get both of these working in your install profile, you need to include the following code to your profile's hook_install_tasks_alter().

/**
* Implements hook_install_tasks_alter()
*/
function MYDISTRIBUTION_install_tasks_alter(&$tasks, $install_state) {

  // Magically go one level deeper in solving years of dependency problems
  require_once(drupal_get_path('module', 'panopoly_core') . '/panopoly_core.profile.inc');
  $tasks['install_load_profile']['function'] = 'panopoly_core_install_load_profile';
}

Enable Support for Panopoly's Apps (Optional)

Panopoly leverages the Apps module to enable the many apps that create magic with Panopoly. In order to get this working in your install profile, you need to include the following code to your profile's hook_install_tasks().

/**
* Implements hook_install_tasks().
*/
function MYDISTRIBUTION_install_tasks($install_state) {
  $tasks = array();

  // Add the Panopoly App Server to the Installation Process
  require_once(drupal_get_path('module', 'apps') . '/apps.profile.inc');
  $tasks = $tasks + apps_profile_install_tasks($install_state, array('machine name' => 'panopoly', 'default apps' => array('panopoly_demo')));

  return $tasks;
}

Enhance Distribution Functionality with Panopoly Development Patterns

Once you have the required Panopoly apps installing and your distribution based on Panopoly, it is important to enhance your existing distribution to take advantage of Panopoly development patterns (i.e. switch to using Panopoly's responsive layouts, convert blocks to panel panes) which are outlined in the documentation on developing sites with Panopoly.

Comments

How would you recommend

How would you recommend building a distribution that requires a newer version of a module than one that is included in panopoly's modules make file? (The example is UUID, we need the dev version but panopoly_core has an older version in its make file.)

Try using dev versions

; The Panopoly Foundation

projects[panopoly_core][version] = 1.x-dev
projects[panopoly_core][subdir] = panopoly

projects[panopoly_images][version] = 1.x-dev
projects[panopoly_images][subdir] = panopoly

projects[panopoly_theme][version] = 1.x-dev
projects[panopoly_theme][subdir] = panopoly

projects[panopoly_magic][version] = 1.x-dev
projects[panopoly_magic][subdir] = panopoly

projects[panopoly_widgets][version] = 1.x-dev
projects[panopoly_widgets][subdir] = panopoly

projects[panopoly_admin][version] = 1.x-dev
projects[panopoly_admin][subdir] = panopoly

projects[panopoly_users][version] = 1.x-dev
projects[panopoly_users][subdir] = panopoly

; The Panopoly Toolset

projects[panopoly_pages][version] = 1.x-dev
projects[panopoly_pages][subdir] = panopoly

projects[panopoly_wysiwyg][version] = 1.x-dev
projects[panopoly_wysiwyg][subdir] = panopoly

projects[panopoly_search][version] = 1.x-dev
projects[panopoly_search][subdir] = panopoly

; Panopoly Recommended

projects[devel][type] = module

projects[uuid][version] = 1.x-dev
projects[uuid][download][type] = git
projects[uuid][download][branch] = 7.x-1.x
projects[uuid][patch][1605284] = http://drupal.org/files/1605284-define-types-for-tokens-6.patch

Examples

Can you suggest or point at any example sites that use Panopoly as a base in the way this page describes?

I'm attempting to follow the structure but am not getting the Panopoly modules in the profile directory, rather they are appearing in sites/all/modules.

nobody click here