This module provides a simplified way to create Colorbox popups that load external content, similar to the functionality in Drupal 7, without the extra dependencies of the current Colorbox Load module. It allows you to easily trigger Colorbox popups by adding a specific class to links or by programmatically generating them.
This module depends on the colorbox module.
The colorbox load option was separated from the main module. However the current colorbox load module has other dependencies and took a slightly different direction.
This module follows the same path as it was in drupal 7.
Example
HTML:
<a href="https://www.drupal.org/example.html" class="colorbox-load">View</a>
Code:
$url = Url::fromUri('internal:/example.html');
$link = Link::fromTextAndUrl(t('View'), $url);
$output = $link->toRenderable();
$output['#attributes']['class'] = [
'colorbox-load',
];
colorbox_simple_load_page_attachments($output);