How To: Automated Feeds:
Basic Text Feed from a Single Page
The feed you're going to build is a promotional feed of press releases for
products. This will be a Automated RSS text feed that you will use the Basic
interface to build.
In this scenario the Product Management team creates press releases when new
products are introduced. They list all the press releases on the release.html
page in their directory (04_ProductManagement). Open that file and you will
see that there are two entries in the list. This list has exactly the sort
of content you would want for an RSS text feed: a headline or title; a text
summary or story; a link (in this case the headline is also the link); and
even a date. You will use this list as the source for an RSS feed of press
releases.

Naturally, you will begin by creating a new feed. Press the New Feed button
in the toolbar of the RSS DreamFeeder floating panel. (If RSS DreamFeeder isn't
open you can access it through the Window menu.)

The first step in the basic interface is to select the type of feed (RSS Text
Feed) and to provide the Title and Description of the feed. After entering
that content you click the next button to proceed to the next panel.

The second step is to provide additional descriptive content about the feed.
You can provide as much or as little of this information as you like, but the
more you fill in the easier it will be for aggregators and search engines to
find and organize the content.

The third step is to provide the domain name of the website. This is so the
links can be built properly as full urls so they will work on no mater where
your content is republished. If you provided this information when setting
up the website in Dreamweaver's site management tool it will be copied here.

The fourth step is to decide how you want the content for this feed to be
built. The goal is to extract the content of the feed from the releases.html
file. So you'll set the source to be files. Your computer will do the work
so you will select Local Processing.

The fifth step is to specify where the content is that you want to process.
The content is a list within a single web page, and so you will select Page
and then specify the file (releases.html). Because the source is a page and
not a directory searching subdirectories doesn't matter.

The last setting on this panel is one of the more important settings. This
controls when new content is added to the RSS feed. You want the RSS feed to
be updated to include any new releases you might later add to the page, so
when the file is modified you need RSS DreamFeeder to look for new content.
Its the default behavior for RSS DreamFeeder when working with a single page
source and its exactly what you want -- add new stuff to the page and it should
be added to the RSS feed too.

Now that you have completed the basic configuration you need to specify what
content elements to extract from the page. To do this you will use the Content
Sampler so press the Launch Content Sampler button.

The RSS DreamFeeder floating panel has now been changed into the Content Sampler,
your tool for sampling the content you wish to extract from the page. The idea
is that you can easily highlight the text you want to use and then sample that
text by pressing the button.

The Content Sampler lists the Content elements your feed is defined to use
and identifies if a match (or Sample) has been defined for that Content. Samples
identify the tag, id, class or template region for that item. Samples with
a dash "-" have not been defined yet (in the current instance, all
of them).
Sample the content for the Headline by selecting Headline from the Content
list in the floating panel, then highlight the text that is the headline (the
big text at the top of the page) and then press the sample button (looks like
an eye-dropper). Notice the sample tells you that you choose an A with class=releaseHeadline
(that's the A [link] html tag it is sampling, but only those links that have
been styled as releaseHeadline).


Do the same for the Story (the paragraph after the headline). Notice that
it is sampling the P tags with releaseStory class that come after the headline
(it should say after the headline in the Sampler list -- you might have to
make the window wider to see).


Now try the Link. You want the Link to link to what the headline links to,
so select Link from the list, then select the headline in the layout and finally
press the sample button. Notice that the sample says Headline's HREF attribute.
The HREF attribute is the part of an html link tag that specifies the destination
of the link. The link in the RSS feed will point to the same page that is specified
in the HREF attribute here.


With Date the default is to simply use the modification date of the file.
That means the date listed will be when you change the page and save it. What
you really want to do is grab the date from the text on the page. You can sample
the Date just like any other piece of content. Try it now and you will see
that it is sampling the TD tag with releaseDate class that comes after the
headline. However, dates are tricky because they have to be real dates that
the computer can easily recognize as a date. If it is unrecognized then the
modification date will be used instead. As long as you stick to basic text
(Jan, January, Feb, February, etc...) and numbers (0-31) and slashes (5/1 or
5/1/2009) it will work.


If the Content Sampler has samples defined for the content entries when you
click on an entry the corresponding text within the document will be highlighted.
Try it by clicking on Headline, Story, Link or Date in the list. Notice the
selection change within the page.
For Author there isn't any content on the page for you to sample. That's OK,
you can just skip it for now. You are done sampling content from the page so
you can click the Done button. The Edit dialog will reopen and your settings
will be transferred back to the RSS feed you were creating.

As you can see you have completed configuring your feed. But when you press
Save it tells you there is an error: Match settings are require for Author.
When you dismiss the error you will be taken to the Advanced interface's Author
panel so you can specify the missing settings.


If you don't want an author you have to tell RSS DreamFeeder to not include
the Author element. This is done in the Elements panel (click Elements from
the Category list) and then uncheck Author. You will notice that Author is
no longer in the Categories list on the left.

That is all the Advanced stuff you're going to do in this tutorial -- just
a little taste. You can see that its pretty extensive, but you don't really
need it when you can use the Content Sampler. Press the Basic tab and you will
return to the final panel in the basic set, ready to save the feed. Now press
the Save button and save the feed as releases.rss within the 04_ProductManagement
directory.

The panel you were just looking at had an important reminder in it -- remember
to process your feed. What does that mean? When you were sampling content you
identified what stuff to extract from the page, but the extraction hasn't happened
yet -- you have only been doing the setup work. Processing the feed means extracting
the content from the source page and including it in the RSS feed. This is
also reflected in the RSS DreamFeeder floating panel. It shows your new feed
(Product Releases) in the list and says that it has never been processed, and
that it has 1 file to check (that would be releases.html).

The file must be examined for content and the content must be extracted and
placed into our feed. That is called Processing the feed, and you do it by
selecting your feed from the RSS DreamFeeder floating panel files list (should
already be selected) and pressing the Process button. While processing you
will see a dialog box that informs you about what is going on.

When the processing is done you will see that your feed has 0 files to check
(in the list in the RSS DreamFeeder floating panel).
Finally, you can try the feed out in your news reader. I like to use Safari
for testing because I can just drag the file I created into the window.

You
will probably notice that the link is pointing off to whatever website you
configured earlier and not to the local file. This is the way an RSS feed is
supposed to be. Your RSS content will be repeated on other websites so it has
to have an absolute URL for every link. But if you don't keep that in mind
it can be startling to see the link not work (at least not locally). I want
to assure you that you did it right.

If you happen to have a web server on your computer like I do on mine and
if you provide the right site URL you can make the links work. This sort of
setup is how most web developers work now anyhow, especially anyone doing server-side
coding (like asp/php/etc...). The relationship between absolute URLs and relative/local
URLs is one of the stickiest bits of work, but once configured, RSS DreamFeeder
handles it for you.
Congratulations -- You have created an RSS feed.
An RSS feed is not really ever a finished document. It is a reflection of
ongoing activity within your website. The releases.rss feed isn't just another
list of press release in the site, it is an ongoing list of new press releases
as you add them to the website, or more specifically to the press real ease
listing page that you specified as the source for this feed. And the great
beauty of the configuration work you've done on this feed is that once the
press releases page is updated all you will have to do to update the RSS feed
is press the Process button. I like that so I'm going to say it again -- one
click and you're updated. Sweet.
So there is another press release in the hold folder in 04_ProductManagement
called SCLRelease.html. Move it to the releases folder. You can do this in
the Files panel in Dreamweaver by simply dragging the file. If you get prompted
to update any links you should do it.
There is also a file called SCLBlurb.html that contains the blurb to use on
the press releases page (as if your boss had emailed it to you). Open that
page in Dreamweaver and you'll use it to copy and paste.
Now go back to releases.html (the press release page) so you can edit it.
The press releases are in a table with the most recent entries at the top of
the table (reverse chronological order). The easiest thing to do is to copy
and paste the first press release entry and then modify it. So select the whole
table row and copy it, then click at the start of the headline and paste (a
new row will be inserted automatically).
Now you can copy and paste the headline text and descriptive paragraph from
SCLBlurb.html -- do it one at a time or you might loose some of the styling.
Change the date to May 30. Change the link for the headline to link to SCLRelease.html
in the releases folder.
Depending on how you copy/paste you might loose the styling that identifies
the content as release material. If you did it one at a time like I suggested
above you didn't. Check it by selecting the headline and see that it is styled
as releaseHeadline. Select the description and be sure that it is styled as
releaseStory. Select the date and be sure it is styled as releaseDate. Remember
that the style information is what you sampled with the content sampler, if
that information is lost or doesn't match then the content will not be included
in the RSS feed. I'm including this warning here not because this is hard to
maintain -- actually its very easy -- I'm saying it so that you have a clear
understand of how your toolkit works.
You can use whatever method you like to get the new content onto the page.
What I outlined above is a reflection of my preferred methods. Everyone uses
Dreamweaver in their own way, and that's fine as long as you get the job done.

Now that you are done editing the press releases page you need to save it.
When you do save it you will notice that the files list in the RSS DreamFeeder
floating panel now indicates that there is 1 file to check for your feed.

You have now arrived at the single-click update. Simply select your feed from
the files list in the RSS DreamFeeder floating panel (probably already selected)
and press the Process button.

Your feed is processed, the new content is extracted from the source page,
and it now is in the RSS feed. Check it for yourself by loading the feed into
your RSS reader (if you used Safari you can just press the refresh button in
Safari).

Congratulations -- You have updated an RSS feed.
Of course, you have to wonder how people will find your RSS feed. You can
link to it from any page you like, but in this case you might try it with the
release.html page. Read our note on linking to learn how.
One other thing you might be interested in. If you want to edit the content
of the feed directly you can use the Content tab of the Edit dialog. Simply
select your feed from the files list in the RSS DreamFeeder floating panel
and press the Edit button (looks like a little pencil) and then press the Content
tab. You can change headlines, stories, dates, links or whatever you need (to
fix a stupid typing error). This is also a useful way to check the content
of a feed if you don't have an RSS reader handy.

If you're interested you may choose to proceed to another tutorial:
|