@@ 250-271 (lines=22) @@ | ||
247 | /** |
|
248 | * Injects meta tags into the header |
|
249 | */ |
|
250 | protected function setMetaTags() |
|
251 | { |
|
252 | if ($this->episode) { |
|
253 | $this->page->meta_title = $this->episode->title; |
|
254 | $this->page->meta_description = $this->episode->summary; |
|
255 | ||
256 | // Extra meta tags, available via {% placeholder head %} |
|
257 | $this->meta_tags = [ |
|
258 | 'twitter:card' => 'summary', |
|
259 | 'og:title' => $this->episode->title, |
|
260 | 'og:description' => $this->episode->summary, |
|
261 | 'og:type' => 'video.episode', |
|
262 | 'og:url' => $this->controller->currentPageUrl(), |
|
263 | ]; |
|
264 | ||
265 | if ($this->episode->image) { |
|
266 | // Full path |
|
267 | $this->meta_tags['og:image'] = URL::to($this->episode->image->getPath()); |
|
268 | } |
|
269 | ||
270 | } |
|
271 | } |
|
272 | ||
273 | } |
@@ 269-291 (lines=23) @@ | ||
266 | /** |
|
267 | * Injects meta tags into the header |
|
268 | */ |
|
269 | protected function setMetaTags() |
|
270 | { |
|
271 | // Show related tags |
|
272 | if ($this->show) { |
|
273 | $this->page->meta_title = $this->show->name; |
|
274 | $this->page->meta_description = $this->show->description; |
|
275 | ||
276 | // Extra meta tags, available via {% placeholder head %} |
|
277 | $this->meta_tags = [ |
|
278 | 'twitter:card' => 'summary', |
|
279 | 'og:title' => $this->show->name, |
|
280 | 'og:description' => $this->show->description, |
|
281 | 'og:type' => 'video.tv_show', |
|
282 | 'og:url' => $this->controller->currentPageUrl(), |
|
283 | ]; |
|
284 | ||
285 | if ($this->show->image) { |
|
286 | // Full path |
|
287 | $this->meta_tags['og:image'] = URL::to($this->show->image->getPath()); |
|
288 | } |
|
289 | ||
290 | } |
|
291 | } |
|
292 | ||
293 | } |