Browse Source

s/title/description/

root 1 year ago
parent
commit
0e0965c83c
2 changed files with 6 additions and 5 deletions
  1. 3 2
      src/Controller/PodcastRorController.php
  2. 3 3
      templates/podcast.html.twig

+ 3 - 2
src/Controller/PodcastRorController.php

@@ -91,12 +91,13 @@ class PodcastRorController extends ControllerBase {
         }
         return $data;
     }
-    public function podcast($query, $title) {
+    public function podcast($query, $description) {
         // TODO: add $title argument to the function
         $template = $this->twig->loadTemplate(drupal_get_path('module', 'podcast_ror') . '/templates/podcast.html.twig');
         $tmpl_data = [ 'ror' => array('podcast' => $this->query($query),
             'url' => \Drupal::service('path.current')->getPath(),
-            'title' => $title,
+            'description' => $description,
+            'title' => 'Radio Onda Rossa',
         )];
         //$variables['ror']['url'] = 
         $xml = $template->render($tmpl_data);

+ 3 - 3
templates/podcast.html.twig

@@ -7,13 +7,13 @@
     version="2.0">
 <channel>
 <atom:link href="http://www.ondarossa.info{{ ror.url | escape("html_attr") }}" rel="self" type="application/rss+xml" />
-<title>Radio Onda Rossa</title>
+<title>{{ror.title}}</title>
 <link>http://www.ondarossa.info</link>
 <language>it-it</language>
 <itunes:subtitle>La radio di chi se la sente</itunes:subtitle>
 <itunes:author>Ondarossa</itunes:author>
-<itunes:summary>{{ror.title}}</itunes:summary>
-<description>{{ror.title}}</description>
+<itunes:summary>{{ror.description}}</itunes:summary>
+<description>{{ror.description}}</description>
 <itunes:owner>
     <itunes:name>Ondarossa</itunes:name>
         <itunes:email>ondarossa@ondarossa.info</itunes:email>