Creating Templates
Previous  Top  Next

Export Templates

Export templates are simply text files that define the format that the feed will be exported into. Templates may contain several variables that are automatically filled in when the feed is exported. For example a template could be a full html Web page, with variables in the places you want the feed's data to be inserted. Here is an example of a simple HTML template file:

<HTML>
<HEAD>
<TITLE>~~~FeedTitle~~~</TITLE>
</HEAD>
<BODY>
<H1>~~~FeedTitle~~~</H1>
<H2>~~~FeedDescription~~~</H2>
<BR>
<TABLE width="100%">
~~~BeginItemsRecord~~~
<TR><B>~~~ItemTitle~~~</B></TR>
<TR>~~~ItemDescription~~~</TR>
<BR>
~~~EndItemsRecord~~~
</TABLE>
</BODY>
</HTML>

Each variable name is surrounded by three tildes (~~~) so that it isn't mistaken for regular text. When a feed is exported using this template, each variable is replaced with the actual feed's data.

Two special variable names act as markers. They are '~~~BeginItemsRecord~~~" and '~~~EndItemsRecord~~~". Everything in between these two variables will be duplicated for each item in the feed. So, for example, if your feed has 5 items in it, everything between these two variables will be repeated 5 times. Each time the next item's information will be used in the variables found in the duplicated section.

This is what the output of this template would look like for a sample feed with three items in it:

<HTML>
<HEAD>
<TITLE>FeedForAll Sample Feed</TITLE>
</HEAD>
<BODY>
<H1>FeedForAll Sample Feed</H1>
<H2>RSS is a fascinating technology. The uses for RSS are expanding daily.</H2>
<BR>
<TABLE width="100%">
<TR><B>RSS Solutions for Restaurants</B></TR>
<TR>FeedForAll helps Restaurant's communicate with customers. Let your customers know the latest specials or events</TR>
<BR>
<TR><B>RSS Solutions for Schools and Colleges</B></TR>
<TR>FeedForAll helps Educational Institutions communicate with students about school wide activities, events, and schedules.</TR>
<BR>
<TR><B>RSS Solutions for Computer Service Companies</B></TR>
<TR>FeedForAll helps Computer Service Companies communicate with clients about cyber security and related issues.</TR>
<BR>
</TABLE>
</BODY>
</HTML>

When viewed in a Web browser the output will look something like this:

FeedForAll Sample Feed

RSS is a fascinating technology. The uses for RSS are expanding daily. Take a closer look at how various industries are using the benefits of RSS in their businesses.

RSS Solutions for Restaurants
FeedForAll helps Restaurant's communicate with customers. Let your customers know the latest specials or events.

RSS Solutions for Schools and Colleges
FeedForAll helps Educational Institutions communicate with students about school wide activities, events, and schedules.

RSS Solutions for Computer Service Companies
FeedForAll helps Computer Service Companies communicate with clients about cyber security and related issues.


Here are the variables available for use in FeedForAll export templates:

~~~FeedTitle~~~
~~~FeedDescription~~~
~~~FeedLink~~~
~~~FeedPubDate~~~
~~~FeedPubLongDate~~~
~~~FeedPubShortDate~~~
~~~FeedPubLongTime~~~
~~~FeedPubShortTime~~~
~~~ItemTitle~~~
~~~ItemDescription~~~
~~~ItemLink~~~
~~~ItemPubDate~~~
~~~ItemPubLongDate~~~
~~~ItemPubShortDate~~~
~~~ItemPubLongTime~~~
~~~ItemPubShortTime~~~

~~~BeginItemsRecord~~~
~~~EndItemsRecord~~~