You are here

views-view-row-googlenews.html.twig in Views Google News 8

Default theme implementation to display an item in a views Google News feed.

Available variables:

  • loc: Item location/link.
  • name: Name of the news publication.
  • language: Language of the news publication.
  • access: Possible values include "Subscription" or "Registration", describing the accessibility of the article.
  • genres: A comma-separated list of properties characterizing the content of the article, such as "PressRelease" or "UserGenerated.".
  • publication_date: Article publication date in W3C format, using either the "complete date" format (YYYY-MM-DD) or the "complete date plus hours, minutes and seconds" format with time zone designator (YYYY-MM-DDThh:mm:ssTZD) format.
  • title: The title of the news article.
  • keywords: A comma-separated list of keywords describing the topic of the article.
  • stock_tickers: A comma-separated list of up to 5 stock tickers of the companies, mutual funds, or other financial entities that are the main subject of the article.

File

templates/views-view-row-googlenews.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display an item in a views Google News feed.
  5. *
  6. * Available variables:
  7. * - loc: Item location/link.
  8. * - name: Name of the news publication.
  9. * - language: Language of the news publication.
  10. * - access: Possible values include "Subscription" or "Registration", describing the accessibility of the article.
  11. * - genres: A comma-separated list of properties characterizing the content of the article, such as "PressRelease" or "UserGenerated.".
  12. * - publication_date: Article publication date in W3C format, using either the "complete date" format (YYYY-MM-DD) or the "complete date plus hours, minutes and seconds" format with time zone designator (YYYY-MM-DDThh:mm:ssTZD) format.
  13. * - title: The title of the news article.
  14. * - keywords: A comma-separated list of keywords describing the topic of the article.
  15. * - stock_tickers: A comma-separated list of up to 5 stock tickers of the companies, mutual funds, or other financial entities that are the main subject of the article.
  16. *
  17. * @see template_preprocess_views_view_row_googlenews()
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. <url>
  23. <loc>{{ loc }}</loc>
  24. <news:news>
  25. <news:publication>
  26. <news:name>{{ name }}</news:name>
  27. <news:language>{{ language }}</news:language>
  28. </news:publication>
  29. {% if access %}
  30. <news:access>{{ access }}</news:access>
  31. {% endif %}
  32. {% if genres %}
  33. <news:genres>{{ genres }}</news:genres>
  34. {% endif %}
  35. <news:publication_date>{{ publication_date }}</news:publication_date>
  36. <news:title>{{ title }}</news:title>
  37. {% if keywords %}
  38. <news:keywords>{{ keywords }}</news:keywords>
  39. {% endif %}
  40. {% if stock_tickers %}
  41. <news:stock_tickers>{{ stock_tickers }}</news:stock_tickers>
  42. {% endif %}
  43. </news:news>
  44. </url>