Development
Font color
Font background color
Size Small
Size Normal
Size Big
Head 1 | Head 2 |
---|---|
item 1 | item 2 |
item 3 | item 4 |
/**
* Implements hook_page_attachments().
*/
function cat_teams_page_attachments(array &$page) {
// Loading page specific components based on URL.
$current_path = \Drupal::service('path.current')->getPath();
$path_args = explode('/', $current_path);
if (($current_path == '/teams-list') || ($current_path == '/user') || ((isset($path_args[1]) && $path_args[1] == 'teams-list')) || ((isset($path_args[1]) && $path_args[1] == 'user')) || ((isset($path_args[1]) && $path_args[1] == 'team'))) {
$page['#attached']['library'][] = 'cat_teams/cat_teams.cat-teams';
$page['#attached']['library'][] = 'core/drupal.dialog.ajax';
}
}