I want to add a newsfeed to my homepage and figured embedding a blog would be the easiest way so when I update that it would automatically update the website. I have looked for a way to do this and cannot seem to figure any out. please help!
If your blog publishes an RSS feed (most do) you could use that to
drive the ReadFeed Action (read more at ActionsForge). You’ll need to
make a few custom styles to give it the look and feel you want it to
have, and set up a folder on your server for the cache to be saved in.
The result can look entirely integrated into your site.
Walter
On Jan 28, 2010, at 2:35 PM, Rich Camp wrote:
I want to add a newsfeed to my homepage and figured embedding a blog
would be the easiest way so when I update that it would
automatically update the website. I have looked for a way to do this
and cannot seem to figure any out. please help!
There isn’t any way to truncate a long portion of a field in the RSS.
The only way to control the display in terms of content length is by
choosing which fields to display. The Action will suppress any fields
in the source XML that are not listed in the format string. That’s an
interesting idea, I’ll have to see if I can get a moment to work on
that. But I don’t see any good way to do that in a quick look through
the code.
As far as the CSS goes, you can do something like this:
That will do a hard reset of all of the list-like attributes. You can
selectively add back some formatting to the .feedlist li selector,
like maybe some padding so the lines don’t crash into one another, or
you could add a selector for .feedlist li a to style the links.
Walter
On Nov 29, 2010, at 8:04 AM, Scott Crundwell wrote:
Using the Read Feed action, how do you specify the article length?
Also, using the CSS styles is there a way to delete the bullet
points and indents?
Click on the Template Edit button, and delete the last %s and the
break before that from the format string. Then in the Elements field,
delete the word ‘description’ and the comma preceding it, so your
Elements appears as ‘link, title’. This will completely ignore the
description.
You could also add field names into the Elements field and provide a
place for them in the template by adding a %s for them. Each element
is considered in order, so if you wanted to show the date before the
link, you would make your Elements field read ‘date, link,
title’ (assuming that the RSS called that field date – it might be
published_date or some other such thing’). You will find the names of
the various fields that are available to you by looking into the raw
XML provided by your source. Also, depending on your hosting server,
there’s about a 95% chance that these field names will be case-
sensitive, so if you don’t get anything, take a look at the actual RSS
that your feed is sending you and adjust where needed. A tag that
reads <Name> will not respond to being asked for by <name>.
Also, as far as dates go – these are going to be in a raw ISO format,
so not very friendly looking, and there’s no facility in the Action
for reformatting them. But this would be a good project for a rainy day.
Walter
On Nov 29, 2010, at 9:08 AM, Scott Crundwell wrote:
Thanks Waltd, out of interest how exactly do I emit the ‘description’?