ReadFeed allows you to do almost anything with the feed. By default, it creates a link on the headline to the story, but you can get in there with tweezers and do almost anything you like.
The key thing to understand is that it takes the content of the feed, breaks it into pieces (one per story in that feed) and then breaks each of those stories down into multiple variables. It does not prescribe what those are, but by convention, most RSS feeds include link
, title
and description
, so it uses those as the defaults.
If you read (with a text editor, not an RSS reader) through the XML that makes up a feed, you will see that there are considerably more options available – a published date, maybe an image tag, all of which can be accessed individually. The PHP code that the Action writes is completely agnostic about this part, and it’s up to you to decide which of them you want to use, and in what order.
Once the feed has been broken into tiny pieces, it gets filtered back out through a template. This is a snippet of HTML with placeholders in it to describe where the pieces go when you put it back together. You don’t have to use all the pieces, as I will show in a moment.
The documentation on ActionsForge goes into a bit of detail about this: ReadFeed - ActionsForge (read down to the part where it starts “The template follows the Unix-standard printf
format.”).
The default template looks like this: <a href="%s" rel="new_window">%s</a><br />%s
. If you wanted to add a link at the end, you could do it like this:
<a href="%s" rel="new_window">%s</a><br />%s<br /><a href="%s" rel="new_window">Read more</a>
Then, in the Elements field, you would also need to account for that additional use of a variable, by changing the value from link, title, description
to link, title, description, link
.
See how that does for you. This is (believe it or not) a very tiny and gentle introduction to programming. To get a different output, just change the input. You can do almost anything you want with this Action, because it’s a very simple tool, and does not prescribe a single way to do the job.
Walter
On Mar 21, 2017, at 3:41 AM, H.Banken email@hidden wrote:
Hello Freeway user.
I use the ‘readfeed’-action and i’m happy with it.
But i’m a little bit happier if there would be a simple way to add a linked ‘read more’ element (button or text link) below each
?
actionsdev mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk
actionsdev mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options