diff --git a/README.md b/README.md index 02afe25..b502a72 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,4 @@ The podcast page uses [mediaelement.js](http://mediaelementjs.com/) to support c Mediaelement.js was the best solution I could find for supporting single video/audio files over multiple browsers, but feel free to edit the module to use your own solution. ## Contact -Feel free to email me at with any suggestions, comments or to say thanks. Log any issues on the [GitHub repository](https://github.com/lukereative/silverstripe-podcast) or feel free to issue a pull request with a fix. \ No newline at end of file +Feel free to email me at with any suggestions, comments or to say thanks. Log any issues on the [GitHub repository](https://github.com/lukereative/silverstripe-podcast) or feel free to issue a pull request with a fix. diff --git a/code/dataobjects/PodcastEpisode.php b/code/dataobjects/PodcastEpisode.php index cbf3c6b..3e48cbb 100644 --- a/code/dataobjects/PodcastEpisode.php +++ b/code/dataobjects/PodcastEpisode.php @@ -122,6 +122,15 @@ public function episodeLink() return $this->PodcastPage()->AbsoluteLink('episode/' . $this->ID); } + /** + * Returns the relative link to the episode's page + * @return string + */ + public function relativeEpisodeLink() + { + return $this->PodcastPage()->RelativeLink('episode/' . $this->ID); + } + /** * Returns a thumbnail of the Episode Image * @return Image diff --git a/templates/Layout/PodcastPage.ss b/templates/Layout/PodcastPage.ss index 12d10eb..8876f7f 100644 --- a/templates/Layout/PodcastPage.ss +++ b/templates/Layout/PodcastPage.ss @@ -1,5 +1,5 @@ <% include PodcastRequirements %> -div class="podcast"> +
<% if $PodcastTitle %>

$PodcastTitle

<% end_if %> <% if $PodcastImage %><% with PodcastImage.setWidth(200) %>$Title<% end_with %><% end_if %>