Commit 7016229f authored by alexpott's avatar alexpott

Issue #1843758 by joelpittet, jpamental, tlattimore: Convert...

Issue #1843758 by joelpittet, jpamental, tlattimore: Convert views/templates/views-view-row-rss.tpl.php to twig.
parent f202b562
{#
/**
* @file
* Default theme implementation to display an item in a views RSS feed.
*
* Available variables:
* - title: RSS item title.
* - link: RSS item link.
* - description: RSS body text.
* - item_elements: RSS item elements rendered as XML (pubDate, creator, guid).
*
* @see template_preprocess()
* @see template_preprocess_views_view_row_rss()
*
* @ingroup themeable
*/
#}
<item>
<title>{{ title }}</title>
<link>{{ link }}</link>
<description>{{ description }}</description>
{{ item_elements }}
</item>
<?php
/**
* @file
* Default view template to display a item in an RSS feed.
*
* @ingroup views_templates
*/
?>
<item>
<title><?php print $title; ?></title>
<link><?php print $link; ?></link>
<description><?php print $description; ?></description>
<?php print $item_elements; ?>
</item>
......@@ -910,12 +910,16 @@ function template_preprocess_views_view_rss(&$vars) {
}
/**
* Default theme function for all RSS rows.
* Prepares variables for views RSS item templates.
*
* Default template: views-view-row-rss.html.twig.
*
* @param array $vars
* An associative array containing:
* - row: The raw results rows.
*/
function template_preprocess_views_view_row_rss(&$vars) {
$view = &$vars['view'];
$options = &$vars['options'];
$item = &$vars['row'];
$item = $vars['row'];
$vars['title'] = check_plain($item->title);
$vars['link'] = check_url($item->link);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment