commit 2066f8910c01e59e0bb2c3ebc1f39d86d4ba4b37 Author: Joel Pittet Date: Fri Sep 20 13:22:43 2013 +0100 doc fixes 2 + 6 diff --git a/core/modules/toolbar/templates/toolbar.html.twig b/core/modules/toolbar/templates/toolbar.html.twig index 728cec6..e0a1ff2 100644 --- a/core/modules/toolbar/templates/toolbar.html.twig +++ b/core/modules/toolbar/templates/toolbar.html.twig @@ -9,7 +9,11 @@ * - tabs: List of tabs for the toolbar. * - attributes: HTML Attributes for the tab container. * - link: Link or button for the menu tab. - * - trays: Toolbar trays, each associated with a tab. + * - trays: Toolbar tray list, each associated with a tab. Each tray in trays + * contains: + * - attributes: HTML attributes to apply to the tray. + * - label: The tray's label. + * - links: The tray menu links. * * @see template_preprocess_toolbar() * diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 6e25128..2174cbb 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -238,6 +238,7 @@ function template_preprocess_toolbar(&$variables) { if (array_key_exists('#heading', $element[$key]['tray'])) { $variables['trays'][$key]['label'] = $element[$key]['tray']['#heading']; } + // Unset the tray so it doesn't render twice in the template. unset($element[$key]['tray']); }