Add podcast listing page
This commit is contained in:
parent
203056d54a
commit
fc1beaf3fb
10 changed files with 414 additions and 2 deletions
5
modules/opd_podcast/opd_podcast.info.yml
Normal file
5
modules/opd_podcast/opd_podcast.info.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
name: Podcast
|
||||
description: Custom functionality for podcasts.
|
||||
core_version_requirement: ^11
|
||||
type: module
|
||||
package: Custom
|
21
modules/opd_podcast/opd_podcast.module
Normal file
21
modules/opd_podcast/opd_podcast.module
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Drupal\node\NodeInterface;
|
||||
|
||||
function opd_podcast_node_links_alter(array &$links, NodeInterface $entity, array &$context): void {
|
||||
if ($entity->bundle() !== 'podcast_episode') {
|
||||
return;
|
||||
}
|
||||
|
||||
$links['node']['#links']['node-readmore']['title'] = t('Listen now<span class="visually-hidden"> to @title</span> →');
|
||||
|
||||
$links['node']['#links']['node-readmore']['attributes']['class'] = [
|
||||
'p-0',
|
||||
];
|
||||
|
||||
$links['#attributes']['class'][] = 'list-none';
|
||||
$links['#attributes']['class'][] = 'm-0';
|
||||
$links['#attributes']['class'][] = 'p-0';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue