amazon_onsite-1.0.0-beta5/templates/rss-product-item.html.twig
templates/rss-product-item.html.twig
{#
/**
* @file
* Default theme implementation to display an item in a views RSS feed.
*
* Available variables:
* - item_elements: RSS item elements to be rendered as XML (pubDate, creator,
* guid).
*
* @see template_preprocess_views_view_row_rss()
*
* @ingroup themeable
*/
#}
<amzn:product>
{% for tag, value in item_elements -%}
{% set cdata=false %}
{% if tag in [ "amzn:productHeadline", "amzn:productSummary" ] %}
{% set cdata=true %}
{% endif %}
{% apply spaceless %}
{{ '<' }}{{ tag -}}
{%- if value -%}
{{ '>' }}{% if cdata %}{{ '<![CDATA[' }}{% endif %}{{ value }}{% if cdata %}{{ ']]>' }}{% endif %}{{ '</' }}{{ tag }}{{ '>' }}
{%- else -%}
{{ ' />' }}
{%- endif -%}
{% endapply %}
{%- endfor %}
</amzn:product>
