Link to home
Start Free TrialLog in
Avatar of sohairzaki2005
sohairzaki2005Flag for United States of America

asked on

Create an rss subscribe button to let the user subscribe to an rss feed created in coldfusion

Please I would like to Create an rss subscribe button

I created an rss feed xml file in my web application using cffeed and a table in sql server. I would like to add a button on my web page so that when the user clicks it he will automatically subscribe to this feed.
Thanks
Avatar of azadisaryev
azadisaryev
Flag of Hong Kong image

1) add
<link rel="alternate" href="path/to/your/feed/xml/rss/etc/file" type="application/rss+xml" title="name-of-your-feed-here" />
to the <head> section of your page.
this will add an RSS icon the the address bar of all modern browsers.
this will let your users see that the page has an rss feed associated with it, and will allow your feed auto-discovery by rss readers.

2) add a regular <a href="path/to/your/feed/xml/rss/whatever/file">Subscribe to RSS</a> in your page where you want the link to appear. style it as you like. the web has a lot of free RSS icons/buttons you can use if you want.

Azadi
http://www.feedicons.com/

I favor the second approach from azadisaryev, above.  We just use a plain text link styled in the "RSS orange" color at our church site.  See the right sidebar here:
http://www.nationalpres.org/
rss-icon.png
my 2 points above were not either/or options - you should use both of them together.

the <link> element add the feed auto-discovery possibility, so that users who want to subscribe to your feed using an rss reader can enter just the page url instead of a direct link your your feed xml file. presence of <link> element in your page's code will also make the browsers display a nice rss icon in the address bar announcing availability of your feed.

Azadi
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sohairzaki2005

ASKER

Thanks a lot it worked