Add "More podcast episodes with..." block
If a guest has been on multiple podcast episodes, show a list on an episode page linking to their other episodes. For this to work, each page needs `data.podcast_episodes` to be in scope, so `use: [podcast_episodes]` needs to be added to the episode. Whilst I could do this only for the specific episodes, adding it to all the episodes will make it clearer in the future that I need to have it instead of forgetting to add it and wondering why it doesn't work.
This commit is contained in:
parent
e1c216fa91
commit
076802cb5b
27 changed files with 55 additions and 0 deletions
|
@ -75,4 +75,12 @@
|
|||
{% endfor %}
|
||||
<ul>
|
||||
</div>
|
||||
|
||||
{% for guest in page.guests %}
|
||||
{% include 'podcast/other-episodes.html.twig' with {
|
||||
all_episodes: data.podcast_episodes,
|
||||
guest,
|
||||
topic: page.topic,
|
||||
} only %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue