Welcome to WebmasterWorld Guest from 54.145.144.101

Forum Moderators: phranque

Message Too Old, No Replies

Hypertext links in an RSS feed

   
2:47 pm on Jun 15, 2004 (gmt 0)

10+ Year Member



Hi again everyone,

I am trying to insert some links (to different websites) into my RSS feed. I don't want the "news items" themselves to be links, however; instead, I want to have a "read more" link *below* each news item that will link to a page of archived news items.

I can't seem to find a simple answer anywhere - maybe there is none?

Any help you could provide would be greatly appreciated.

1:55 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Generally this is done with the <link> element:

<item>
<title>This is headline one</title>
<link>http://www.example.com/news/123-1.htm</link>
</item>
<item>
<title>This is headline two</title>
<link>http://www.example.com/news/123-2.htm</link>
</item>

It is left to the consumer (RSS news reader app) to determine how the link should be presented. Some will simply make the title text into a link. Others will add a "read more..." type link. Others will just ignore it.
2:21 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



Thanks for the reply!

I've tried using the <link> tag, but it doesn't seem to make the links "clickable" in my browser OR the aggregator I am using to preview my feed. (I'm using a stylesheet to format the XML files so that they'll fit with the look of my site when they are pulled up by the browser.)

Here is what I am working with: <snip>

Is it going to be impossible for me to get clickable links in both browsers and RSS aggregators? At this point, I would settle for either...I'm pulling my hair out here. :/

Thanks again!

[edited by: Woz at 4:42 am (utc) on June 17, 2004]
[edit reason] No URLs please, see TOS#13 [/edit]

2:58 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Funny - the RSS that I provide is on the same subject matter!

I am sending you a link to it via sticky mail. I is currently used by people from MyYahoo and other services. It is also used by some private websites.

Again, it is the responsibility of the aggregator to utilize the provided link element. The RSS feed is supposed to provide information with meta data so that the consuming application can format it the way that best suits it.

3:04 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



How weird that you also do war stuff! I'm a summer student working for the National War Museum in Canada. :)

Do you have any thoughts on how I might make the XML files as pulled up by the browser include clickable links? I've tried inserting HTML tags (<a href...>), but the browser won't read them since they're in the content of an XML file, I guess. I now have the links working OK within my aggregator.

I found this article (http://developer.apple.com/internet/webcontent/xmltransformations.html), but it seems awfully complicated.

~:(

3:06 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



Ok, so your feed isn't specifically war-related...I read your post before receiving the stickymail. Hehe. Still, interesting :)
3:11 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have any thoughts on how I might make the XML files as pulled up by the browser include clickable links?

This is a tough issue. If you are readily giving the information away, and you don't seriously mind that some users won't include the links, then just use RSS as you are and hope for the best.

If you want to make sure they include links, or if you want to enforce any other formatting/presentation aspects of your feed, then you have two choices. The first is to manually police the sites or software that uses the feed. This is not very practical. The other is to provide the feed as javascript or IFrame content instead. This is the primary way that I deliver my feeds.

They are free to the websites that use them. What I get out of it is name recognition and branding.

3:26 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



The main purpose of my RSS feed is to have it be displayed in a browser, under a "calendar" that will allow users to pick which RSS feed they want to view by date. I have a JavaScript that automatically displays the correct XML file depending on what the date is. The ability to have the info readable in aggregators, should anyone choose to include it on their site, is pretty much an added bonus.

I actually do plan to have the feed displayed in an iframe (below the calendar) - how would this affect my ability to have clickable links?

3:37 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how would this affect my ability to have clickable links?

If it's in an IFrame by itself, then you can just send plain html instead of xml. So you have complete control.

3:42 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



I'm not sure I understand - how will loading the XML files into an iframe turn them into HTML files?
4:09 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how will loading the XML files into an iframe turn them into HTML files?

Sorry I wasn't more clear. It doesn't. What I meant was, if you know the content will be displayed in an IFrame, then you might consider not using RSS/XML at all. When the user clicks the calendar, that link can point to a standard HTML (or php/asp) page.

4:33 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



You're completely right, and I wish I could do that, but the webmaster here is hoping to have only one set of files (as opposed to both XML and HTML for each date), and he really wants the RSS feed, so...

Thanks very much for your help though!

4:56 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is the Brinkster link you posted pulling HTML from your site and then creating the RSS feed for you? Or do you have code on your site that directly provides the RSS?

If you use your own code to create your RSS directly on your site, then you can also create a file to consume your own RSS and deliver it in the html format you want. That is what would go into your iframe. That way the RSS is still available for other uses.

7:38 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



That sounds good - I am indeed creating my own RSS from scratch.

How would I go about doing that?

7:43 pm on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How would I go about doing that?

Not sure what part you are asking about.
10:04 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



Sorry - how would I "create a file to consume my own RSS and deliver it in the html format I want".
1:55 pm on Jun 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The process you need to find out about goes under the names of "xslt", "xsl transformation", "server side transformation", etc.

The method will of course depending on your programming/scripting language. There are quite a few examples available for php and asp/vbscript.

2:07 pm on Jun 17, 2004 (gmt 0)

10+ Year Member



Thanks again, Jon...unfortunately I can't do anything server-side in this case, but I think I have now found a work-around :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month