- <?php
- /**
- * @file
- * Allow you to load any content in a colorbox.
- */
- /**
- * Implements hook_page_attachments().
- */
- function colorbox_load_page_attachments(array &$page) {
- \Drupal::service('colorbox.attachment')->attach($page);
- $page['#attached']['library'][] = 'colorbox_load/colorbox_load';
- }
|