Skip to content
Snippets Groups Projects
Commit 7016229f authored by Alex Pott's avatar Alex Pott
Browse files

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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
{#
/**
* @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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment