Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Custom RSS feed with Drupal

Posted on 2010-08-17
12
Medium Priority
?
1,207 Views
Last Modified: 2013-12-13
I need to create an RSS feed for our press releases.  I've tried the aggregator module that comes with Drupal, but it's throwing an error and I don't have time to debug and see what's wrong.

We've got a view established, so I pulled the SQL statement that pretty much gives me what I want and need.  It's listed below.

Basically what I want is a template for a standard RSS feed where all I need to do is fill in the SQL statement and my DB info.  You'd think that would be pretty easy to find, but evidently not.

Thanks in advance for any help you can offer.

Here's the SQL:
SELECT node.nid AS nid, node_data_field_news_date.field_news_date_value AS node_data_field_news_date_field_news_date_value FROM node node  LEFT JOIN content_type_news node_data_field_news_date ON node.vid = node_data_field_news_date.vid WHERE (node.status <> 0) AND (node.type in ('news')) ORDER BY node_data_field_news_date_field_news_date_value DESC
0
Comment
Question by:freezilla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 10

Expert Comment

by:oliverpolden
ID: 33454396
Just create a new view display of type RSS and set the path for it :-) Easy peasy.
0
 

Author Comment

by:freezilla
ID: 33454448
I've tried this in Drupal, really I have.  Something isn't working where it will allow me to create an RSS feed in Drupal, so that's why I'm trying to do it this way.
0
 

Author Comment

by:freezilla
ID: 33454464
Or walk me through your solution, Oliver, maybe you're seeing something I'm not.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 10

Expert Comment

by:oliverpolden
ID: 33454473
Are you using the views module?  In that you can add a 'Feed' display which is an RSS feed.  You don't need to use any other modules.
0
 

Author Comment

by:freezilla
ID: 33454493
Right, I tried that.  I get this error:
- Display "Feed" uses a path but the path is undefined.
- Style RSS Feed requires a row style but the row plugin is invalid.
0
 
LVL 10

Accepted Solution

by:
oliverpolden earned 2000 total points
ID: 33454515
Ok, down the bottom left under 'Feed settings', next to 'Path', click 'None' and set the path, something like 'rss',  then Near the top left under 'Basic settings' set the Row style to 'Node'.
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 33454522
Then go to yoursite.com/rss and you'll see your feed.
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 33454538
I may at some point open up my site www.e3m.co.uk which has got tutorials on things exactly like this, but if you would like, I'll give you a free account.
0
 

Author Comment

by:freezilla
ID: 33454594
Ok, getting there.  The URL of my site shows our 404 page: http://www.mybwmc.org/rss

But I no longer get the display feed path and style missing row plugin errors.  The "Live Preview" shows a bunch of HTML as well, so I'm sure it's a setting somewhere.

I've attached a screen shot of my views page if that helps any.


bwmc.gif
0
 

Author Comment

by:freezilla
ID: 33454618
Ok, well I finally got it to work.  I used the "Attach To" and attached it to the News block, so the URL is now feed://www.mybwmc.org/rss/2010 and it works fine.

Gracias, sir!
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 33454637
Oh yes, that's because you had an argument in your feed so it requires the year for it to work, if you get rid of that that argument then /rss will work.

You're welcome.
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 33454644
You could override that argument for the rss display if you want, to keep it in the other view displays.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question