Drupal 7 Views - Customize RSS Output Template

I have an RSS feed for custom types in Drupal 7 using the Views module. Created views-view-row-rss.tpl.php in the / mytheme / directory and in the "Edit view" "Timing information" Style line output: views-view-row-rss.tpl.php shows that the template was found in my themes directory. The problem is that this template is not used, the RSS feed is always created using the default template. Clicking on the Row style displays the default template. How to force the Views module to use its own template?

+4
source share
3 answers

You must put a specific file name, like what you see in the topic information in the views. Say, for example, if there is a "sales" feed as a view.

Template files in accordance with the information on the topic: view-view-in-line RSS - sale - feed.tpl.php view views-RSS - sale - feed.tpl.php

Be sure to clear the cache and place the files in the templates folder. ex. themes \ custom \ MyTheme \ Templates

+1
source

Do not use submissions.

Use EntityFieldQuery and pass nids to node_feed .

EFQ is VERY easy to use. Below are a few guides .

0
source

The correct layout of view templates is sites / all / themes / mytheme / templates / views /

Move it there and run the full cache flash, and you will see it.

0
source

Source: https://habr.com/ru/post/1343169/


All Articles